Converting CSS Keywords to RGB
Enter any standard CSS color name into the converter above to reveal its exact Red, Green, and Blue channel values. The tool references the official CSS specification to map the keyword directly to its sRGB coordinates.
How Browsers Handle Named Colors
Every named color in CSS is strictly bound to the sRGB color space. This means that words like cyan or magenta do not represent the absolute brightest versions of those colors that a modern monitor can display; they represent the brightest versions available within the legacy sRGB gamut.
When you convert a named color to RGB, you are extracting the exact 0-255 decimal values that the browser uses to mix light on the screen. For example, typing orange yields rgb(255 165 0), telling the monitor to turn the red sub-pixels all the way up, the green sub-pixels to about 65%, and leave the blue sub-pixels off.
Programmatic Lookups
If you are building a web application that needs to process named colors, you cannot rely on native JavaScript math functions. You must include a dictionary object in your code that maps the 148 string keys to their HEX or RGB equivalents, and check user input against that dictionary.