Skip to Content
utilscalculateContrast

calculateContrast

See source on Github 

Calculates the contrast ratio between two RGB colors.

  • @param rgb1 - The first RGB color.
  • @param rgb2 - The second RGB color.
  • @returns The contrast ratio between the colors.