Color Contrast Checker
Check foreground and background colors against WCAG contrast ratios for normal and large text.
The inputted text is too long to include in a share link.
Convert CSS colors between hex, RGB, HSL, OKLCH, and Lab formats.
Use this converter when the same color needs to move between CSS, design documentation, QA notes, or design-system tokens.
Hex, RGB, and HSL are widely supported CSS color formats. OKLCH and Lab are perceptual color spaces, which makes them useful for modern design systems because lightness and chroma changes tend to behave more like people expect.
This is useful when a color comes from one tool but needs to be used somewhere else. A designer may hand off OKLCH values, a brand guide may list hex codes, a browser inspector may show RGB, and a CSS file may need HSL for easier manual adjustments. Seeing the formats together reduces the chance of copying the wrong value.
The preview swatch is included as a quick sanity check. It will not replace accessibility testing or device review, but it helps confirm that the parsed color is the one you intended before you paste it into production code or documentation.
The converter parses the input as a CSS color, converts the parsed value into each target color space, and rounds channel values for readable CSS output. Alpha values are preserved when the input includes transparency.
Color conversions are not just string formatting. Different spaces describe color in different ways: RGB describes channels of light, HSL describes hue with saturation and lightness, while Lab and OKLCH model color more closely to human perception. Moving between them can introduce tiny decimal differences, especially after rounding.
When browser compatibility matters, hex, RGB, and HSL remain the safest choices. OKLCH is helpful for modern CSS and design-system work, particularly when you want more predictable adjustments to lightness and chroma.
Built and maintained by utilkit. Found an issue? Send corrections to contact@utilkit.com
Check foreground and background colors against WCAG contrast ratios for normal and large text.
Crop and resize JPG, PNG, and WebP images directly in your browser.
Optimize JPG, PNG, and WebP images for free in your browser, with support for both lossy and lossless image compression.