Colour converter
Pick a colour and convert it between HEX, RGB, HSL, HSV and OKLCH.
HEX, rgb() or hsl()
Formats
- HEX
#1f7a5c - RGB
rgb(31, 122, 92) - HSL
hsl(160, 59%, 30%) - HSV
hsv(160, 75%, 48%) - OKLCH
oklch(51.92% 0.0964 166.23)
Swatch
Missing a feature or found a bug in Colour converter? Tell me on X (@_andrewtran) or by email.
How to use Colour converter
- Type a colour as HEX, rgb() or hsl(), or use the picker.
- Read it in every format on the left.
- Copy the format you need.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
What is OKLCH?
A newer CSS colour format where equal steps in lightness look equal to the eye. All current browsers support it.
Why can HSL values be off by one?
HSL is shown in whole numbers, so converting there and back can shift a colour by a single step. HEX and RGB are exact.
Related tools
CSS clamp() generator
Build a CSS clamp() for fluid font sizes and spacing that scale between two screen widths.Unicode character inspector
See the code point, type, UTF-8 bytes and UTF-16 units of every character in a piece of text.User agent parser
Read the browser, engine, operating system and device type from any user agent string.Keyboard event inspector
Press any key to see its key, code, keyCode, location and modifiers, as JavaScript receives them.