@dragonspark/chroma-kit
    Preparing search index...

    Function contrastDeltaLStar

    • Calculates the difference in CIE Lightness (L*) between two colors in the Lab color space.

      The Delta-L* contrast metric is a simple measure that evaluates the contrast between two colors based solely on their lightness values in the Lab color space. This approach is used by Google Material Design, where HCT Tone is equivalent to CIE Lightness.

      Formula: |L1 - L2|

      Key characteristics:

      • Based on the CIE Lab* color space, which is designed to be perceptually uniform
      • Simple and computationally efficient
      • Focuses exclusively on lightness differences, ignoring chromatic components
      • Directly corresponds to perceived lightness differences in human vision
      • Used in Google's Material Design system for ensuring accessible contrast

      Limitations:

      • Ignores chromatic components (a* and b*), which can contribute to perceived contrast
      • May not accurately predict contrast for colors with similar lightness but different hues
      • Does not account for the non-linear response of human vision at extreme lightness values
      • Simplistic compared to more comprehensive contrast metrics

      Parameters

      • color1: LabColor

        The first color in Lab color space, containing its lightness (L*).

      • color2: LabColor

        The second color in Lab color space, containing its lightness (L*).

      Returns number

      The absolute difference between the lightness values of the two colors.