Function blackOrWhite

  • Determine if either black or white provides more contrast to the provided color

    Parameters

    • background: string

      Color to compare against

    Returns "white" | "black"

    Color with the most contrast