Color Picker

HEX, RGB and HSL values from sliders.

Colour code
#2E4760
RGB
rgb(46, 71, 96)
HSL
hsl(210, 35%, 28%)

Hue steps (same saturation and lightness)

About this tool

Designers and developers constantly move between colour formats. This picker lets you choose a colour with three sliders for hue, saturation and lightness, shows a large preview, and gives the matching HEX, RGB and HSL values, which you can copy with one tap. Hue is the position on the colour wheel from 0 to 360 degrees, saturation is how vivid the colour is and lightness is how bright or dark. HSL is often the easiest way to make a colour slightly lighter, darker or less intense, because you change just one number. Below the result, a row of ten swatches shows colours at evenly spaced hues with the same saturation and lightness, a quick way to find colours that sit well together. Everything is computed in your browser.

How to use it

  1. Move the Hue slider to choose the base colour.
  2. Adjust Saturation to make it more vivid or more grey.
  3. Adjust Lightness to make it lighter or darker.
  4. Read the HEX, RGB and HSL values and copy them.
  5. Use the swatches to find colours with matching saturation and lightness.

How it works

Given hue h, saturation s and lightness l (as fractions), a = s × min(l, 1 − l) and each RGB channel = l − a × max(min(k − 3, 9 − k, 1), −1), where k = (n + h ÷ 30) mod 12 with n = 0, 8, 4 for red, green and blue. The channels are scaled to 0-255 and written in hexadecimal for the HEX code.

Example: A hue of 210, saturation 35% and lightness 28% gives the colour rgb(46, 71, 96) with the HEX code 2E4760 (written with a leading hash in CSS), a deep slate blue.

Common uses

  • Choosing brand or theme colours for a website or presentation.
  • Converting a colour between HEX, RGB and HSL formats for CSS.
  • Finding a lighter or darker shade of an existing colour.

Frequently asked questions

What is the difference between HEX, RGB and HSL?
They describe the same colours in different ways. HEX is a compact code, RGB lists red, green and blue amounts and HSL describes hue, saturation and lightness.
Why use HSL?
It matches how people think about colour, so making something darker or less intense means changing one number.
Does it check contrast for accessibility?
No. Check text and background combinations with a contrast checker; normal text needs at least a 4.5 to 1 ratio under WCAG AA.
Can I enter a HEX code to start from?
Not in this version. Use the sliders to choose a colour, then copy the values.

Last reviewed 2026-11-01. Browse all tools