Web accessibility guidelines require sufficient color contrast between text and backgrounds; yet, manually adjusting colors often necessitates significant visual deviation, compromising vital brand aesthetics. We present a novel, multi-phase optimization approach for automatically generating WCAG-compliant colors while minimizing perceptual change to original design choices. Our method treats this as a constrained, non-linear optimization problem, utilizing the modern perceptually uniform OKLCH color space. Crucially, the optimization is constrained to preserve the original hue ($\text{H}$) of the color, ensuring that modifications are strictly limited to necessary adjustments in lightness ($\text{L}$) and chroma ($\text{C}$). This is achieved through a three-phase sequence: binary search, gradient descent, and progressive constraint relaxation. Evaluation on a dataset of 10,000 procedurally generated color pairs demonstrates that the algorithm successfully resolves accessibility violations in $77.22\%$ of cases, with $88.51\%$ of successful corrections exhibiting imperceptible color difference ($ΔE_{2000} < 2.0$) as defined by standard perceptibility thresholds. The median perceptual change for successful adjustments is only $0.76\ ΔE_{2000}$, and the algorithm achieves this with a median processing time of $0.876\text{ms}$ per color pair. The approach demonstrates that accessibility compliance and visual design integrity can be achieved simultaneously through a computationally efficient, perceptually-aware optimization that respects brand identity. The algorithm is publicly implemented in the open-source cm-colors Python library.


翻译:网页可访问性指南要求文本与背景之间具有足够的色彩对比度;然而,手动调整色彩通常需要显著的视觉偏差,从而损害重要的品牌美学。我们提出了一种新颖的多阶段优化方法,用于自动生成符合WCAG标准的色彩,同时最小化对原始设计选择的感知变化。我们的方法将此视为一个约束非线性优化问题,利用现代感知均匀的OKLCH色彩空间。关键的是,优化过程被约束以保持色彩的原始色调($\\text{H}$),确保修改严格限于对明度($\\text{L}$)和色度($\\text{C}$)的必要调整。这是通过一个三阶段序列实现的:二分搜索、梯度下降和渐进约束松弛。在包含10,000个程序生成色彩对的数据集上的评估表明,该算法成功解决了$77.22\\%$案例中的可访问性违规问题,其中$88.51\\%$的成功校正显示出不可察觉的色彩差异($ΔE_{2000} < 2.0$),这是根据标准感知阈值定义的。成功调整的感知变化中位数仅为$0.76\\ ΔE_{2000}$,并且算法以每对色彩$0.876\\text{ms}$的中位数处理时间实现了这一目标。该方法表明,通过一种计算高效、感知敏感且尊重品牌身份的优化,可同时实现可访问性合规性和视觉设计完整性。该算法已在开源cm-colors Python库中公开实现。

0
下载
关闭预览

相关内容

learn to see in the dark-低照度图像增强算法
计算机视觉life
16+阅读 · 2019年1月14日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关资讯
learn to see in the dark-低照度图像增强算法
计算机视觉life
16+阅读 · 2019年1月14日
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
相关基金
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员