白色文字在此颜色上
黑色文字在此颜色上
WCAG AA 要求普通文本 4.5:1,大文本 3:1。AAA 分别要求 7:1 和 4.5:1。
:root {
--color-primary: #3B82F6;
--color-primary-rgb: 59, 130, 246;
--color-primary-hsl: 217, 91%, 60%;
}Learn More About Color
Design accessible color schemes for all users:
About Color Converter
Color formats vary depending on the platform—web design uses HEX and RGB, while print uses CMYK. Our free online Color Converter instantly translates colors between HEX, RGB, HSL, HSV, and other formats.
How It Works
The tool parses your input color and uses mathematical formulas to convert the color values into different color spaces. For example, it converts a base-16 HEX string into base-10 RGB values, and then calculates hue, saturation, and lightness for HSL.
Common Use Cases
- Translating design mockups (HEX) into CSS code (RGB/HSL)
- Converting digital colors (RGB) to print-ready formats (CMYK)
- Finding the exact color codes for brand guidelines
- Adjusting color opacity using RGBA or HSLA values
Frequently Asked Questions
RGB defines colors based on the amount of Red, Green, and Blue light. HSL defines colors based on Hue (the color itself), Saturation (intensity), and Lightness (brightness), which is often more intuitive for human designers.
Screens emit light (RGB), while printers absorb light using ink (CMYK). Some bright RGB colors cannot be perfectly reproduced in CMYK, leading to slight visual differences.