Skip to content

Color Picker

Pick a color with the color box or paste a hex code with 3, 6 or 8 digits. You see the full hex code, the short form, the red, green and blue values and a CSS-ready rgb() value right away. It is free and no email is needed.

Loading the tool…

How it works

  1. You pick a color with the color box, or type or paste a hex code such as #00ff00, 00ff00 or #0f0. The # sign is optional. You can also choose whether the result shows lowercase or uppercase letters.
  2. The tool trims spaces, drops one leading # and checks the rest. The W3C CSS Color Module Level 4 says a hex color has 3, 4, 6 or 8 digits, each 0 to 9 or a to f, and that the case of the letters does not matter. This tool reads 3, 6 and 8 digits. A 3-digit code is expanded by doubling each digit, so #123 becomes #112233.
  3. It then reads the digits in pairs, as the W3C rules say. The first pair is red, the next is green and the last is blue. Each pair is a hexadecimal number where 00 is 0 and ff is 255. So #ff6347 is red 255, green 99 and blue 71.
  4. In an 8-digit code the last pair is the alpha, from 00 (fully see-through) to ff (fully solid). The tool turns it into a percent: the pair divided by 255, times 100, rounded to the nearest whole number. So #0000ffcc gives rgb(0 0 255 / 80%).
  5. The result shows a large swatch of the color over a checkerboard, the full 6-digit or 8-digit hex code, the 3-digit short form when each pair repeats one digit, the three color values and a CSS rgb() value with spaces, such as rgb(0 255 0). Each one has a copy button.

Questions

What is a hex color code?

It is a way to write a color for web pages. A # sign is followed by hexadecimal digits, 0 to 9 and a to f. In a 6-digit code the three pairs give the amount of red, green and blue, each from 00 (0) to ff (255).

Does upper or lower case matter?

No. The W3C rules say the case of the letters does not matter, so #00ff00 and #00FF00 are the same color. The letter case option only changes how the result is written, so it can match the rest of your code.

When does a color have a 3-digit short form?

Only when each pair of a 6-digit code repeats one digit, such as #112233, which can be written #123. Only 4096 colors have a 3-digit form, compared with about 17 million in 6-digit form. Codes with 8 digits get no short form here.

What do the last two digits of an 8-digit code mean?

They are the alpha, which sets how see-through the color is. 00 is fully transparent and ff is fully solid. The tool shows it as a percent at the end of the rgb() value, so cc becomes 80%.

Why is my 4-digit code not read?

The W3C rules allow 4-digit codes, but this tool does not decode them. Write the color as 8 digits instead, in the form #rrggbbaa.

Can it convert to HSL or other formats?

No. It shows hex and rgb() values only. HSL and other formats are not converted here.

Why does the color look different on another screen?

The codes describe sRGB colors. Screens and settings differ, so the same code may look a little different from one device to another.

Do I have to give my email?

No. The result shows on screen right away and the tool is free to use. The email box below the result is optional and is there if you want a copy of the codes.

Sources, checked October 12, 2026

  • W3C, CSS Color Module Level 4
    • a hex color has 3, 4, 6 or 8 hexadecimal digits
    • digits 0-9 or letters a-f, and the case of the letters does not matter
    • the first pair is red, from 00 to ff (255)
    • the next pair is green and the last pair is blue
    • #00ff00 is the same color as rgb(0 255 0)
    • the last pair of an 8-digit code is the alpha, 00 transparent to ff opaque
    • #0000ffcc is the same color as rgb(0 0 100% / 80%)
    • a 3-digit code is a 6-digit code with each digit doubled