Skip to content

Contrast

What It Does

The Contrast node calculates the contrast ratio between two colors. It provides a numeric value representing the contrast level, with higher numbers indicating greater contrast between the colors.

Inputs

NameDescriptionTypeRequired
AFirst color to compareColorNo
BSecond color to compareColorNo
AlgorithmContrast calculation method (APCA is default)StringNo
AbsoluteWhether to return the absolute value of the contrastYes/NoNo

Outputs

NameDescriptionType
ValueThe calculated contrast ratio between the two colorsNumber

How to Use It

  1. Drag the Contrast node into your graph.
  2. Connect two colors to the "A" and "B" inputs (defaults are black and white).
  3. Optionally choose the algorithm method and whether to use absolute value.
  4. The output will be a numeric value representing the contrast ratio.

Tips

  • Higher contrast values generally indicate better readability when using text.
  • The APCA algorithm provides perceptually accurate contrast measurements.

See Also

Use Cases

  • Accessibility Verification: Check if text and background color combinations meet WCAG standards.
  • Readability Testing: Evaluate if UI elements have sufficient contrast for clear visibility.
  • Color Pair Evaluation: Compare different color combinations to find optimal contrast ratios.