Skip to main content

Color Picker & Converter

Pick colors and convert between HEX, RGB, and HSL formats.

Built and tested by Muhammad Irfan Liaqat · Updated

HEX
#3B82F6
RGB
rgb(59, 130, 246)
HSL
hsl(217, 91%, 60%)
RGBA
rgba(59, 130, 246, 1)

Color Picker & Converter: key facts

  • Pick a colour with your browser's colour picker or type a HEX code
  • Shows the colour as HEX, RGB, HSL and RGBA, each ready to copy
  • Input is HEX only; RGB and HSL values are outputs
  • Runs in the browser with nothing uploaded

HEX, RGB and HSL colour codes explained

Pick a colour with the colour chooser or type a HEX code, and the tool shows the same colour as HEX, RGB and HSL, each ready to copy into CSS or a design app.

The three formats describe the same colours in different ways. HEX packs red, green and blue into six hexadecimal digits, so #3B82F6 means red 3B (59), green 82 (130) and blue F6 (246). RGB writes the same channels as numbers from 0 to 255: rgb(59, 130, 246). HSL describes the colour as hue, an angle from 0 to 360 on the colour wheel, plus saturation and lightness as percentages, which makes it easy to create lighter or darker shades by changing only the last number.

How to pick a color and get its HEX, RGB and HSL

  1. 1Click the colour swatch to open your device's colour chooser, or type a HEX code
  2. 2Read the HEX, RGB and HSL values
  3. 3Click Copy next to the format you need

Frequently Asked Questions

How do I convert HEX to RGB?
Split the six digits into three pairs and convert each from hexadecimal to a number from 0 to 255. #3B82F6 becomes 3B = 59, 82 = 130 and F6 = 246, so rgb(59, 130, 246). Typing the HEX code here shows the RGB value straight away.
What is the difference between HEX and RGB?
None in the colour itself. HEX writes red, green and blue in base 16 (#FF0000 is red); RGB writes them as decimal numbers (rgb(255, 0, 0)). Both work in CSS.
When is HSL more useful than HEX?
When you need variations of one colour. Keeping the hue and saturation and changing only the lightness gives a consistent set of tints and shades for hover states, borders and backgrounds.
Can I type an RGB or HSL value?
Not directly; the text box accepts HEX codes. Pick the colour with the chooser instead, or convert the value to HEX first.
How do I convert RGB to HEX?
Write each of the red, green and blue values (0–255) as a two-digit hexadecimal number and join them: rgb(255, 99, 71) is #FF6347. This tool converts from HEX, so to check a HEX code's RGB value, type the HEX code in.
Can I pick a colour from my screen or an image?
It depends on your browser's colour picker. On desktop, Chrome and Edge include an eyedropper that can sample any colour on screen, and Safari's colour panel has one too. Firefox and most phone browsers show a colour picker only.
What does RGBA mean?
RGB with an alpha (opacity) value from 0 (transparent) to 1 (solid). The tool shows alpha 1; change it in your CSS, for example rgba(37, 99, 235, 0.5) for 50% opacity.

Related Tools

Guides