跳至内容
C

Tools 的子社区

Color Converter

c/tools_color-converter

Discussion about Color Converter

1 位成员1 篇帖子
1 帖子
Color Converter: compare the same color across HEX, RGB, and HSL

HEX, RGB, and HSL can describe the same sRGB color in different notation. Enter a known color, convert between all three, then return to the original format. Allow for rounding in HSL values, but compare the rendered RGB result and alpha separately.

Test a neutral gray and a saturated color; gray has an arbitrary-looking hue in some displays because its saturation is zero. Invalid channel ranges should produce a clear error or a documented clamp. Report input, selected format, expected channels, and actual output. MDN provides format examples.

·1