Color contrast checker
Check WCAG 2.2 text contrast with a live preview and separate AA and AAA results for normal and large text.
Convert HEX, RGB and HSL colors with alpha transparency, preview the swatch and copy ready-to-use CSS color values.
Edit HEX, RGB or HSL. The other formats and the preview update together.
Transfer a design color into CSS using whichever representation you already have. Conversions cover sRGB values, not CMYK or print spot colors.
Enter a HEX, RGB or HSL value, or use the color picker. The opacity slider updates the results. Three-, four-, six- and eight-digit HEX values and RGB/HSL alpha values are supported.
RGB channels accept 0–255 values or percentages. HSL saturation and lightness use percentages. Out-of-range values are rejected. This tool does not convert print CMYK or wide-gamut color spaces.
HEX, RGB and HSL each have their own editable field. Change whichever format you prefer and the other two update immediately. The field you are typing in retains its text and cursor; incomplete or invalid input is marked and copying stays unavailable until it is valid.
CSS uses #RRGGBBAA, with alpha in the last two digits. Some applications use ARGB instead, so check the order before pasting. RGB and HSL can also include alpha.
Use rgb(255 0 0 / 50%) or hsl(0 100% 50%), for example. Comma syntax also works, but do not mix commas with slash syntax. Color names and CMYK are not accepted.
HEX stores alpha in 256 steps. Exactly 0.5 rounds to 80, which represents 128/255. Keep RGB or HSL output when you need the decimal alpha value rather than eight-digit HEX.
Your choice about analytics
We use Umami to measure page visits. Analytics is optional, and your tools work either way.
Your current setting allows analytics.
Your current setting does not allow analytics.
The analytics service has changed. Refresh the page after finishing your current work to apply the new settings.
Your browser is sending a Do Not Track or Global Privacy Control signal. Analytics will remain off.
We use Umami to understand which pages people visit and how they find this site. You can decline or change your choice at any time. All site features will still work.
Your choice is saved in this browser for six months. Analytics does not upload files or content you enter in our tools.
Privacy Policy
Comments
0