Color Conversion Tools

Color Name to RGB

Get the red, green and blue values for any CSS color keyword. Type a name like tomato and copy rgb(255, 99, 71) for code, spreadsheets, canvas drawing or hardware that needs numbers.

Color Name to RGB

Edit a channel and see the color result immediately.

Swap direction

Enter CSS color name

Type a standard CSS color name, such as steelblue or rebeccapurple.

RGB result

Source color
Result color
rgb(70, 130, 180)

RGB channels are 8-bit integers, so reverse conversion may round slightly.

The conversion runs in your browser.

All formats

HEX
#4682b4
RGB
rgb(70, 130, 180)
HSL
hsl(207.3, 44%, 49%)
HSV
hsv(207.3°, 61.1%, 70.6%)
CMYK
cmyk(61.1%, 27.8%, 0%, 29.4%)
OKLCH
oklch(58.8% 0.099 245.7)
CSS
steelblue

Tints and shades

Text contrast (WCAG)

Aa4.11:1On whiteLarge text only
Aa5.11:1On blackAA

Normal text needs 4.5:1 for AA and 7:1 for AAA; large text needs 3:1.

How it was calculated

  1. steelblue = #4682b4 = rgb(70, 130, 180) (CSS Color 4)

Common colors in CSS color name and RGB

Choose a color to load it into the converter.

ColorCSS color nameRGB
blackrgb(0, 0, 0)
whitergb(255, 255, 255)
redrgb(255, 0, 0)
limergb(0, 255, 0)
bluergb(0, 0, 255)
yellowrgb(255, 255, 0)
aquargb(0, 255, 255)
fuchsiargb(255, 0, 255)
grayrgb(128, 128, 128)
maroonrgb(128, 0, 0)
greenrgb(0, 128, 0)
navyrgb(0, 0, 128)
orangergb(255, 165, 0)
steelbluergb(70, 130, 180)
rebeccapurplergb(102, 51, 153)
tomatorgb(255, 99, 71)

How to use

  1. Start typing a CSS color name and pick it from the suggestions.
  2. Read the exact rgb() channels and see the color; other notations are in the All formats panel.
  3. Copy the channels, or click a row in the reference table to load another familiar color.

Examples

Tomato

CSS defines tomato as #ff6347. Read as channels, that is 255 red, 99 green and 71 blue.

Input
tomato
Output
rgb(255, 99, 71)

When you need channel values for a keyword

Color keywords are convenient in CSS but invisible to most other tools. Converting them to RGB helps when:

  • Drawing on a canvas or in a game engine, where colors are usually numeric tuples.
  • Configuring hardware, such as LED strips or smart lights that take red, green and blue bytes.
  • Matching a prototype in a spreadsheet or chart that only accepts numbers.
  • Teaching how screens mix light, since a familiar name makes the channel numbers concrete.

How it works

The CSS Color specification gives every keyword an exact sRGB value. The converter looks up the name, case-insensitively, and returns its three channels. For tomato the stored value is #ff6347: ff = 255, 63 = 6 × 16 + 3 = 99 and 47 = 4 × 16 + 7 = 71. The calculation panel shows this decoding for whichever name you choose.

Notes on the keyword list

  • Duplicates exist. aqua and cyan are both rgb(0, 255, 255); fuchsia and magenta are both rgb(255, 0, 255).
  • Names are historical, not systematic. darkgray (169) is lighter than gray (128), and green (0, 128, 0) is darker than lime (0, 255, 0).
  • A useful palette for quick work. The reference table below the converter lists sixteen common keywords with their values in both formats.

For the reverse direction, RGB to Color Name finds the nearest keyword for any channels. To get a code instead of numbers, use Color Name to HEX.

Frequently asked questions

Why would I need RGB numbers for a named color?

Canvas and image APIs, game engines, LED controllers, Excel and many charting libraries accept numeric channels but not CSS keywords. Converting keeps the exact color the browser shows.

Are the values exact?

Yes. Every keyword has one fixed value in the CSS specification, so there is no rounding.

How do I add transparency?

Use the channels with an alpha value in CSS, for example rgb(255 99 71 / 50%), or in code as an RGBA tuple.

What about transparent and currentcolor?

Those are special keywords without a fixed RGB value, so they are not in the list. Every one of the 148 color names is.

Can I type names with spaces, like light blue?

CSS keywords have no spaces: use lightblue. The suggestions show the correct spelling as you type.

Related tools