- public static double darker (double tone, double ratio)
Returns tone <= tone parameter that ensures the ratio with the
input tone.
- public static double darker_unsafe (double tone, double ratio)
Tone <= tone parameter that ensures ratio. Returns 0 if ratio
cannot be achieved.
- public static double lighter (double tone, double ratio)
Returns tone >= tone parameter that ensures the ratio with the
input tone.
- public static double lighter_unsafe (double tone, double ratio)
Tone >= tone parameter that ensures ratio. Returns 100 if ratio
cannot be achieved.
- public static double ratio_of_tones (double t1, double t2)
Contrast ratio of two tones (T in HCT, L* in L*a*b*).
- public static double ratio_of_ys (double y1, double y2)
Contrast ratio is a measure of legibility, used to compare the
lightness of two colors.