Color Converter
Convert HEX, RGB/RGBA, and HSL/HSLA colors with contrast guidance.
Enter a HEX, RGB, RGBA, HSL, or HSLA color to convert it into common CSS color formats. Add a comparison color to estimate contrast for an opaque color pair.
How to use
Use HEX values such as #2162eb, RGB/RGBA values such as rgb(33, 98, 235) or rgb(33 98 235 / 0.5), and HSL/HSLA values such as hsl(221, 83%, 53%).
The output reports copyable HEX, RGB or RGBA, HSL or HSLA, alpha, and an optional WCAG contrast ratio. Contrast is calculated from the color channels you enter; translucent colors can look different once they are layered over real page backgrounds.
Named CSS colors, percentage RGB channels, modern color spaces such as Lab and OKLCH, and system colors are not supported in this version.
Color values stay in your browser and are not uploaded by this tool.