Skip to main content

system.kanoa.utilities.getContrastingColor

This function requires KanoaCore module

Description

#Input a string of RGB hex digits with hash sign to compute a complementary contrasting color such as for fonts against a background (kanoaCore).

Syntax

getContrastingColor(hexColor)
  • Parameters
      hexColor (String) - RGB hex digits with a hash sign (e.g., #FF0000).
  • Returns
      hexColor (String) - The contrasting color.
  • Code Example

    # Example Usage:
    contrasting_color = system.kanoa.utilities.getContrastingColor('#FF0000')