AI 中文总结
本文扩展 alpha 合成系数至大于 1,使对比度增强自适应背景,实现对象跨 Web 场景重用,以固定 α=1.1 在 99.8% 组合中提升对比度,且无额外运算开销。
AI 中文摘要
不透明度通常被理解为物体遮挡其背景的程度,完全不透明是其终点。然而,alpha 合成会缩放物体与其背景之间的颜色差异,透明度对应于收缩。在 $\alpha=1$ 时,输出达到源颜色,但差异缩放不必止步于此。我们保留合成方程,并将系数域从 $[0,1]$ 扩展到 $[0,+\infty)$,在保持收缩的同时增加扩展。每个物体携带固定的源颜色和系数;实际背景决定了增强的方向。因此,适应背景的对比度增强成为物体合成属性的一部分。同一个图形对象可以在不同的 Web 上下文中重用,减少了单独颜色变体的设计和维护。实现复用了原始方程,在同一管线中不增加算术运算次数。在所有 8 位 sRGB 源颜色和 16 个预定义的亮色和暗色背景中,固定的 $\alpha=1.1$ 在 99.8145% 的组合中提高了对比度比率。它还使 4.8346% 的所有组合从低于 $3:1$ 提升到至少 $3:1$,在不改变其源颜色的情况下满足此对比度阈值。系数扫描和背景压力测试识别了裁剪减少颜色分离或对比度比率下降的条件。在三个浏览器中的输出验证和计时表明,在常见的 WebGL 管线中实现,对于 $\alpha>1$ 没有持续的运行时增加。
英文摘要
Web graphics travel with content across pages and themes, where changing backgrounds can require recoloring and maintenance. Opacity already makes a fixed object's appearance depend on its background, yet is usually understood only as how much the object obscures it. In fact, opacity controls the scaling of the object-background color difference; transparency is only one effect of this relationship. Zero places the output at the background and one at the source color, but difference scaling need not stop at either position. We retain the compositing expression and extend the coefficient domain from $[0,1]$ to the real numbers: negative values reverse the difference, whereas values above one expand it in the same direction. We focus on same-direction expansion for reusing Web graphics across backgrounds. Each object carries a fixed source color and coefficient, while the actual background determines the enhancement direction. Background-adaptive contrast enhancement thus becomes part of the object's compositing properties, reducing the design and maintenance of separate color variants. The implementation reuses the original equation without increasing the per-pixel arithmetic operation count within the same pipeline. Enumerating all 8-bit sRGB source colors on 16 predefined light and dark canvases, a fixed $α=1.1$ increases the contrast ratio in 99.8145% of combinations. Without changing source colors, 4.8346% of all combinations newly reach the $3:1$ contrast threshold. Output validation and timing across three browsers demonstrate implementation in the same WebGL pipeline, with no sustained additional runtime observed.
Comments10 pages, 8 figures, 1 table. Code: https://github.com/ln-one/opacity-is-not-just-opacity