Free Color Converter Online

Convert colours between HEX, RGB, HSL and CMYK, check WCAG contrast ratios and get complementary, triadic, analogous colours and shades in one call.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

The Color API takes a colour as hex (#1e90ff, 1e90ff, #39f), rgb(30,144,255) or hsl(210,100%,56%) and returns it in every common format: hex, RGB, HSL, CMYK and ready-to-paste CSS strings. It also reports the relative luminance, whether the colour is dark, and its contrast ratio against white and black with the best text colour to use on top of it.

For palette work the response includes the complementary colour, two triadic and two analogous colours and eight shades from dark to light (lightness −40 to +40), all as hex values.

Pass a second colour in compare to get the contrast ratio between the two and the WCAG 2.x results: AA for normal text (≥ 4.5), AA for large text (≥ 3) and AAA for normal text (≥ 7). Ideal for accessibility checks of brand colours and UI themes.

Use this in your code

curl "https://apibox.io.vn/v1/color?color=%231e90ff&compare=%23ffffff" \
  -H "Authorization: Bearer YOUR_API_KEY"

API documentation → Get a free API key

FAQ

How do I check WCAG colour contrast?

Call /v1/color?color=%231e90ff&compare=%23ffffff. The compare object returns the ratio (3.24 here) and booleans for AA normal, AA large and AAA normal text. Remember to URL-encode # as %23.

Which input formats are accepted?

3 or 6-digit hex with or without #, rgb()/rgba() and hsl()/hsla(). Alpha values are ignored. Named CSS colours like "red" are not accepted by this endpoint.

How is CMYK calculated?

With the standard naive RGB→CMYK formula (no ICC colour profile), rounded to whole percentages. For professional print, ask your printer for a profile-based conversion.