用可微分门控机制改善色彩渐变中的偏色问题
Chroma-gated, differentiable OKLCH interpolation: Continuous Oklab fallback for color-cast reduction

- 设计可微分的色度门控,平滑过渡到线性奥克兰布空间
- 在典型sRGB调色板下使路径偏离减少49.5%,色相偏差降低35.5%
- 适用于旧引擎、视频管线等不支持现代色彩插值的场景
OKLCH(奥托森奥克兰布色彩空间的柱坐标形式)是CSS Color 4推荐用于渐变和color-mix()的插值空间,现已广泛部署。然而其极坐标参数化在中性轴附近会产生两种偏色:(1) 色彩端点间因跨色相路径导致的意外色相穿越(如蓝到黄明显经过绿);(2) 当一端为无彩色时产生的离线弯曲。现有方法均为双值阈值切换,仅解决(2),对(1)无效,且在有色端点间退化为原始OKLCH。本文提出连续奥克兰布回退(COFb),一种单参数可微分色度门控函数w(C)=C^n/(C^n+σ^n),随色度降低逐步混合至线性奥克兰布路径。单一门控同时处理(1)(2),无需端点判断。通过无归一化偏色半阈准则确定默认参数(n=1,σ≈0.19),符号验证其性质。默认设置下,路径横向偏差减少49.5%,色相加权偏差下降35.5%。局限在于仅针对(2)时仍不如双值切换,且不保持色度。部署上,COFb完全在奥克兰布(a,b)至sRGB空间运行,可作为回退方案,在老旧引擎、图像/视频管线或GPU着色器中实现无偏色渐变。
原文摘要 · Abstract (English)
OKLCH -- the cylindrical (lightness, chroma, hue) form of Ottosson's Oklab color space -- is the interpolation space recommended by CSS Color 4 for gradients and color-mix(), and it is now broadly deployed. Its polar parameterization, however, casts color near the neutral axis in two ways: (1) an inter-hue detour between two chromatic endpoints that sweeps through an unintended hue (blue to yellow visibly passing through green), and (2) an off-line bow when one endpoint is achromatic. Existing remedies are uniformly two-valued -- a threshold switch that fires only at an achromatic endpoint -- so they address only (2); on chromatic pairs every one of them reduces to raw OKLCH, leaving the (1) inter-hue cast untreated. We introduce Continuous Oklab fallback (COFb), a one-parameter, differentiable chroma gate $w(C)=C^n/(C^n+σ^n)$ that continuously blends the OKLCH path toward the linear Oklab path as chroma falls. A single gate reduces the (1) cast that the two-valued family leaves untreated and unifies the handling of (1) and (2) without any endpoint test. We characterize a cast-hue trade-off frontier, adopt a default ($n=1$, the rational Michaelis-Menten form; $σ\approx0.19$ for a typical sRGB palette, from a normalization-independent cast-half criterion), and verify the gate's properties symbolically. At the default, COFb halves the inter-hue path detour (mean lateral deviation -49.5%, chroma-weighted hue excursion -35.5%). We also state the method's limits: on (2) alone the two-valued switch remains better, and like any Cartesian blend COFb does not preserve chroma. In deployment, COFb runs entirely in plain Oklab (a,b) to sRGB, so it serves as a fallback that delivers the same cast-reduced gradients where modern CSS color interpolation (color-mix(in oklch) and the like) is unavailable -- older engines, image and video pipelines, or GPU shaders.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。