转换 colors between hex, RGB, HSL, and named formats
Translate 颜色值 之间 hex (#ff5733), rgb(), hsl(), 和 CSS named colors 为 use 在不同 contexts.
- 1
Colors 出现在 许多 formats: hex (#ff5733), rgb(255,87,51), hsl(11,100%,60%), named (red). 不同 tools 和 contexts 偏好不同 formats. Conversion preserves exact 颜色 while changing representation.
- 2 颜色转换器 →
Paste 颜色在 任何格式化. tool 输出 hex, rgb, rgba, hsl, hsla, 和 nearest CSS named 颜色.
- 3 图片取色器 →
Pick 颜色 visually 和 get 其值 在所有 formats — useful 当你 不有 特定输入颜色但 want 到探索.
常见问题
- 为什么 my HSL conversion look 不同?
- HSL 是 device-dependent (depends 开 display's 颜色 space). conversion 是 mathematically exact 在 sRGB, 但 perceptual differences arise 开 wide-gamut displays. 为关键颜色工作, 指定颜色 space explicitly.
- 能够所有 colors 是 represented 在所有 formats?
- 内 sRGB, 是 — hex, rgb, 和 hsl 是 equivalent. Colors 外部 sRGB (P3, Rec.2020) cannot 是 represented 在 8-位 hex. Alpha transparency requires rgba/hsla 或 8-数字 hex (#rrggbbaa); 6-数字 hex 有否 alpha.