RGB Color Viewer

Shows the color for an RGB code: channel sliders, any rgb() or HEX notation, and contrast against white and black.

Color notation

HEX#FF6347
rgb()rgb(255, 99, 71)
Numbers255, 99, 71
Percentagesrgb(100% 38.82% 27.84%)

The color on white and black

Text on a white background
White text on this color

Text on a black background
Black text on this color

What formats the page understands

You can paste three numbers separated by commas or spaces, an rgb() notation in both the old and the new CSS syntax, percentages, or HEX. A number outside the 0 to 255 range is called out in words, so a typo in the code shows up right away.

A fractional channel value such as 12.5 is rounded to a whole number, and a note under the field says so. Opacity from a notation like rgb(255 99 71 / 50%) is read, but the swatch shows the color itself. HSL, OKLCH, and other formats are handled by the color converter.

Contrast with white and black

For both backgrounds the page computes the contrast ratio under WCAG 2.1. Regular text needs 4.5:1 (level AA) or 7:1 (AAA), and large text, meaning 24 pixels and up, or bold text from 18.66 pixels, gets by with 3:1.

The ratio works the same in both directions: colored text on white reads the same as white text on that color. The screen eyedropper is not available in every browser, and where it is missing the button is hidden. Color combinations and color names are collected on the HTML color codes page.

Rate this tool

Help us get better

Other tools