Skip to content

Free tool · Colors

Hex Color Codes and How to Read Them

What the digits mean, and a finder that turns any color into its code.

See the full color picker How it works

This finder is free with no sign-in. The full color picker is free with a Bravely account.

  • 3, 4, 6 and 8 digits
  • Pick or paste
  • No sign-in

  • 34= 52Red
  • d3= 211Green
  • 99= 153Blue
Try
Nearest CSS color name: lightseagreen

Common hex color codes

The CSS named colors people look up most, each with its red, green and blue.

ColorHEXRGB
White#ffffffrgb(255, 255, 255)
Black#000000rgb(0, 0, 0)
Gray#808080rgb(128, 128, 128)
Light gray#d3d3d3rgb(211, 211, 211)
Silver#c0c0c0rgb(192, 192, 192)
Red#ff0000rgb(255, 0, 0)
Maroon#800000rgb(128, 0, 0)
Orange#ffa500rgb(255, 165, 0)
Yellow#ffff00rgb(255, 255, 0)
Lime#00ff00rgb(0, 255, 0)
Green#008000rgb(0, 128, 0)
Teal#008080rgb(0, 128, 128)
Cyan#00ffffrgb(0, 255, 255)
Sky blue#87ceebrgb(135, 206, 235)
Blue#0000ffrgb(0, 0, 255)
Royal blue#4169e1rgb(65, 105, 225)
Navy#000080rgb(0, 0, 128)
Dark blue#00008brgb(0, 0, 139)
Purple#800080rgb(128, 0, 128)
Magenta#ff00ffrgb(255, 0, 255)
Pink#ffc0cbrgb(255, 192, 203)
Hot pink#ff69b4rgb(255, 105, 180)

How it works

Find a hex code in three steps

  1. 1

    Type or pick

    A hex code, a color name, or a color from the picker.

  2. 2

    Read the pairs

    Each pair as its red, green or blue number.

  3. 3

    Copy it

    The full code, or the same color as rgb() or hsl().

What you get

Everything included, free

All four lengths

Three, four, six and eight digit codes are read, and the short ones are written out in full.

The pairs, split

Each pair shows beside its number from 0 to 255, labeled red, green, blue or alpha.

A name works too

Type a CSS color name such as teal or tomato and read its code.

A picker to start from

Choose a color with your browser's own color control and its code fills in.

RGB and HSL beside it

The same color as rgb() and hsl(), each with its own Copy button.

The nearest CSS name

Under the code, the closest named CSS color, marked when the match is exact.

Other ways to find a color's hex code

The tools you already have can read a color off the screen.

  • Built in

    Chrome DevTools

    Cost
    Included with Chrome
    Good for
    A color on a web page: its Color Picker has an eyedropper that samples the page or anywhere on the screen, and hex is one of the notations it shows.
    Downside
    It opens from a color in a page's styles, inside DevTools, and its eyedropper samples sRGB colors only.

    Chrome DevTools: the Color Picker

  • Built in

    Digital Color Meter

    Cost
    Included with macOS
    Good for
    Any pixel on a Mac's screen: move the pointer over it and the color's values show in the window, ready to copy as text.
    Downside
    Mac only. The values show in the format chosen under View, Display Values, so set that before you copy.

    Apple Support: Digital Color Meter User Guide

  • Free

    PowerToys Color Picker

    Cost
    Free, from Microsoft
    Good for
    Any pixel on a Windows screen: press Win + Shift + C, select a color, and it is copied, as HEX by default.
    Downside
    Windows only, and PowerToys has to be installed first.

    Microsoft Learn: PowerToys Color Picker

  • Ours

    Color Picker

    Cost
    Free with a Bravely account
    Good for
    Reading a code and going on from it: a screen eyedropper in Chrome, Edge or Opera on a computer, harmony schemes, and a palette you export for code.
    Downside
    It needs a Bravely account, and the eyedropper button isn't shown in Safari, Firefox or a phone's browser.

What it doesn’t do

  • A hex code can only describe an sRGB color, so a color outside that range has no hex code.
  • The finder doesn't sample your screen. For a color that is on your screen, use one of the tools listed above.
  • The browser's color control picks opaque colors only. For transparency, type the eight-digit code.
  • The name it shows is the closest CSS color name, not an official name for that code.
  • It doesn't read hsv(), hwb(), lab() or oklch() values.
  • It doesn't keep a list of the colors you look up.

Good to know

What CSS accepts

Any of the four lengths, in either letter case, wherever a color goes.

Read more

CSS takes a hex code of four lengths and no others, so a code with five or seven digits isn't a color. The # is part of the code in a stylesheet, though the finder on this page also reads a code typed without it. Letter case doesn't matter: #34D399 and #34d399 are one color.

A hex code works wherever a stylesheet takes a color, and so do rgb() and hsl() values, which is why the three can stand in for one another.

Hex, RGB and HSL in CSS

Three ways to write one color, each handy for a different job.

Read more

The CSS specification notes that a hex code is shorter than the same color written in rgb(). rgb() shows the three channels as plain numbers. hsl() describes the color as a hue, a saturation and a lightness, and the specification calls that more intuitive than RGB: you can guess at a color and then adjust it. Its own example is a green at hue 120 that is lime green at 50% lightness, dark green at 25% and light green at 75%.

HSV, the fourth notation our color picker shows, isn't part of CSS. It is the model behind that picker's square, where one direction is saturation and the other is brightness. To use an HSV color in a stylesheet, convert it to one of the other three.

Frequently asked questions

What is a hex color code?

A hex color code is a # followed by 3, 4, 6 or 8 base-16 digits, written with 0 to 9 and a to f. In the usual six-digit form the three pairs are red, green and blue, each from 00 to ff, which is 0 to 255. #34d399 is red 52, green 211 and blue 153.

How do I read a hex code?

Split it into pairs and read each pair as a number: multiply the first digit by 16 and add the second, counting a to f as 10 to 15. In #34d399, 34 is 3 times 16 plus 4, or 52. d3 is 13 times 16 plus 3, or 211. 99 is 9 times 16 plus 9, or 153. A higher pair means more of that color.

What is the difference between #fff and #ffffff?

None: they are the same white. A three-digit code is the short form of a six-digit one, read by doubling each digit, so #123 is #112233. The short form can write only 4,096 colors, against about 17 million for six digits.

What do 4 and 8 digit hex codes mean?

The extra digit or pair is alpha, the color's opacity: 00 is fully transparent and ff is fully opaque. #34d39980 is the same green at about half strength, because 80 is 128 of 255. A four-digit code is the short form, doubled the same way as three digits.

How do I find a hex code?

Type its name or pick it in the finder at the top of this page and the code appears. For a color on your screen, use an eyedropper: the tools listed on this page read any pixel. On a Mac, the Bravely Color Picker menu bar app copies the hex code of the pixel you pick; it is free with a Bravely account and needs macOS 14 or later. For a color in a photo, the image color picker reads the pixel you click.

What is the hex code for white and for black?

White is #ffffff and black is #000000: every channel at its highest, and every channel at zero. The table on this page lists the codes people look up most.

From the same studio

Bravely Studios builds nine cross-platform desktop utilities: screenshots, PDF signing, remote desktop and more, with one plan that unlocks all of them. Free tools are how we say hello.