y2kDeep function

int y2kDeep(
  1. int face,
  2. int depthMilli,
  3. int floorMilli
)

The deep tone of face: lightness lowered by depthMilli / 1000 but never below floorMilli / 1000, chroma × 1.12.

Implementation

int y2kDeep(int face, int depthMilli, int floorMilli) {
  final x = argbToOklch(face);
  final floor = floorMilli / 1000;
  final l = x.l - depthMilli / 1000;
  return oklchToArgb(l < floor ? floor : l, x.c * 1.12, x.h);
}