颜色转换器
在HEX、RGB和HSL颜色之间转换
公式
RGB uses 0-255 per channel. HSL uses hue (0-360°), saturation, and lightness percentages.
示例
RGB(66, 135, 245)
= #4287F5 = HSL(216, 90%, 61%)
常见问题
关于 颜色转换器
Convert colors between HEX, RGB, and HSL formats used in web design and programming. HEX codes are the most common format in CSS, using a 6-digit hexadecimal representation (#RRGGBB). RGB specifies red, green, and blue channel values from 0-255. HSL (Hue, Saturation, Lightness) is the most intuitive for designers—hue is the color wheel position (0-360°), saturation is intensity (0-100%), and lightness is brightness (0-100%). Each format has advantages: HEX is compact, RGB maps to display hardware, and HSL makes it easy to create color variations by adjusting individual components. Modern CSS supports all three formats plus transparency variants (RGBA, HSLA).