饾湡饾湵鉁达笌 or Delta Phi Star is a variant method of determining lightness contrast, and a sibling of APCA and SACAM. It is a simplified version using easily invertible standardized maths, however it lacks some useful properties such as polarity sensitivity. In fact, it is intended for applications where a "general" simplifed perceptual contrast is desired, where polarity sensitivity is not needed (or is ambiguous).

  • By Andrew Somers
  • Last update: Sep 17, 2022
  • Comments: 0

version    plain vanilla JS    license   

last commit    downloads    twitter   

饾湡饾湵鉁达笌 (delta phi star)

饾湡饾湵鉁达笌 or Delta Phi Star is a method of determining perceptual lightness contrast developed by Andrew Somers (Myndex Research), and is a sibling of APCA and SACAM. It is a simplified method using easily invertible standardized maths, however it lacks some useful properties such as polarity sensitivity.

But In fact, 饾湡饾湵鉁达笌 is intended for applications where a "general" simplifed perceptual contrast is desired, where polarity sensitivity is not needed or is ambiguous.

饾湡饾湵鉁达笌 was created on the path toward SACAM and APCA.

Here, create Lstar from the piecewise sRGB -> Y and L* per the standard CIE math (see the See Stars microlibrary), then:

    deltaPhiStar = (Math.abs(bgLstar ** 1.618 - txLstar ** 1.618) ** 0.618) * 1.414 - 40 ;
    
    // ** is equiv to Math.pow

This mainly works for "Light Mode" but does not track dark mode quite as well as APCA.

Also, while this is close to parity with light mode APCA for Lc +46 thru +75. The very low and very high contrasts reported by 饾湡饾湵鉁达笌 higher than those reported by APCA. This should be helpful as 饾湡饾湵鉁达笌 is not polarity sensitive the way APCA is.

As the difference has a power curve exponent of 1/饾湵 applied, the difference must be an absolute value. 饾湡饾湵鉁达笌 returns a positive value always, and is symmetrical in regards to polarity (text and BG order do not affect results).

delta phi star logo general purpose contrast algorithm

Github

https://github.com/Myndex/deltaphistar