Function getContrastingColor

  • Returns the contrasting color based on the background color.

    Parameters

    • bgColor: string

      The background color.

    Returns "#000" | "#fff"

    black or white based on the brightness.