在 HEX、RGB 和 HSL 之间转换颜色,并提供实时预览。
如何使用 颜色转换器
以 HEX 形式输入颜色,例如 #ff8800。
即时查看转换为 RGB 和 HSL 的结果。
复制你需要的任意格式。
This is a color converter for web and design work that translates a color between the three formats you use most: HEX, RGB and HSL, with a live swatch so you can see exactly what you are working with.
This is the everyday glue between design and code: matching a brand color from a mockup to a CSS variable, converting a value a designer gave you in one format to the one your framework wants, or finding a slightly lighter shade for a hover state.
Everything runs in your browser, so it is instant and nothing you enter is sent anywhere.
Each format describes the same color differently. HEX (like #ff8800) is the compact form used throughout CSS and HTML. RGB states the red, green and blue channels directly, which is how screens and code such as canvas think about color. HSL describes hue, saturation and lightness, which is far more intuitive when you want to nudge a color: change the hue to shift it around the wheel, or the lightness to make it darker without picking a new code by hand.
Enter a HEX value and the RGB and HSL equivalents update instantly, so you can grab whichever format the tool or codebase in front of you expects.
For now the tool focuses on opaque colors in HEX, RGB and HSL; alpha (opacity) support is not included yet.
常见问题
HEX(#rgb 或 #rrggbb)、RGB 和 HSL。输入 HEX 值,其他格式会实时更新。
暂不支持。本工具专注于不透明的 HEX、RGB 和 HSL。alpha 支持可在以后添加。
嵌入此工具
将此工具添加到你自己的网站。复制下方代码片段即可,它会自动保持最新。
<iframe src="https://monu.tools/embed/zh/color-converter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>相关工具