Skip to contentSkip to the inputSkip to the result

Colour code converter

Convert HEX, RGB and HSL colours

Loading tool

Instructions

Colour code converter

How to use

Enter a colour as #1e90ff, rgb(30,144,255) or hsl(210,100%,56%).

Enter a colour as #1e90ff, rgb(30,144,255) or hsl(210,100%,56%).

Supported input

3- and 6-digit HEX, RGB 0–255 and HSL. Contrast uses the WCAG 2 relative luminance formula.

Input example

#1e90ff

Result example

rgb(30, 144, 255) · hsl(210, 100%, 56%)

Troubleshooting

Values that are not numbers or are out of range are not calculated; the message says what to fix.

Limitations

Alpha, colour names and wide-gamut (P3) colours are not supported.

How it works

Converts a colour between HEX, RGB and HSL and measures its contrast with white and black text. 3- and 6-digit HEX, RGB 0–255 and HSL. Contrast uses the WCAG 2 relative luminance formula.

Units & precision

3- and 6-digit HEX, RGB 0–255 and HSL. Contrast uses the WCAG 2 relative luminance formula.

Search tools

Search by tool name or task. Press Ctrl / ⌘ + K to open.