CSS3 & Modern Layouts (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
CSS Color Module Level 4: Wide-Gamut Colors (`oklch()`, `color-mix()`).
senior LevelCode ExampleSystem Design
In Simple Words:
Traditional sRGB (hex, rgb(), hsl()) cannot display vivid greens, magentas, and cyans available on modern OLED displays (P3 wide gamut).
oklch(L C H):L(Lightness: 0% to 100%),C(Chroma/Saturation),H(Hue angle: 0-360).- Perceptually Uniform: Human eyes perceive
oklchlightness consistently across different hues (unlike HSL where yellow at 50% lightness looks blindingly bright while blue at 50% looks dark).
color-mix(): Natively blends colors in CSS without pre-processors:cssbackground: color-mix(in oklch, var(--primary) 80%, white);