The same colour can be written several ways. Designers tend to share HEX codes like #C08552, CSS often uses rgb(), and HSL is the easiest to adjust by hand. The Hex / RGB Color Converter shows all of them together.
How to convert a colour, step by step
- Type or paste a HEX code into the “HEX” field — or click “Pick” to choose a colour visually.
- Fine-tune with the Red, Green and Blue sliders if you want to adjust it.
- Read the HEX, RGB and HSL values shown for the colour.
- Click “Copy” next to the format you need and paste it into your stylesheet or design tool.
Which format should you use?
- HEX is compact and the most widely shared. The six digits are three pairs — red, green, blue — each from 00 to FF.
- RGB uses the same three channels as numbers from 0 to 255. It is the natural choice when you need transparency, written as rgba().
- HSL describes hue, saturation and lightness. Need a lighter or darker shade of the same colour? Change only the lightness number.
- Check contrast for text. A colour that looks good as a button may be unreadable as text. Make sure there is strong contrast against its background.