Why does lightening a color sometimes change the hue I see?
Because lightening in RGB or HSL adds value to the channels linearly, which distorts hues unevenly, especially yellow (darkens too fast) and blue (oversaturates too fast). Scales built in OKLCH avoid this because they fix the perceptual lightness target and adjust chroma, without touching the R, G, B channels directly.
What is OKLCH and why do token scales use that space?
OKLCH is a perceptually uniform color space created by Björn Ottosson and adopted by CSS Color 4, with lightness (L), chroma (C) and hue (H) separated in a way that approximates how the human eye perceives color difference. Design token scales use this space because varying only lightness preserves hue consistently across different colors, something RGB and HSL do not guarantee.
How do I choose whether text should be white or black over an extracted color?
Calculate the WCAG contrast ratio of the background color against white and against black, and pick whichever reaches at least 4.5:1; mid-luminance colors, like a medium cyan, often fail against white and pass comfortably against black, so the choice is not intuitive without the calculation.
Can a requested color fall outside the screen sRGB gamut?
Yes, mostly at high chroma in the OKLCH space: there are hue and chroma combinations no sRGB monitor can display. When that happens, the alternative to clipping each channel individually is reducing chroma while keeping hue and lightness fixed, which preserves the look of the requested color instead of distorting it.