How RGB values work
Each RGB channel is usually written as a number from 0 to 255. Low values add little light, while high values add more light. Combining the three channels creates the final screen color.
RGB in CSS
Modern CSS can use rgb(255 0 0), rgb(255, 0, 0), or rgb values with alpha transparency. RGB is especially useful when a color must be generated or adjusted by code.
RGB to Hex conversion
Each RGB channel can be converted to a two-character hexadecimal pair. The three pairs form the final Hex color code.
Related color tools
Use these tools to pick, convert, test, and export the color values described in this guide.
More color guides
Color GuidesPractical guides for HTML color codes, Hex values, RGB, HSL, CSS colors, palettes, web safe colors, and shades.HTML Color CodesLearn how HTML color codes work and copy Hex, RGB, HSL, OKLCH, named colors, and CSS-ready color values.Hex Color CodesA guide to Hex color codes, six-digit #RRGGBB values, shorthand Hex colors, and Hex to RGB conversion.HSL Color CodesLearn HSL color codes, hue angles, saturation, lightness, and how to use hsl() in CSS.CSS Color CodesUse CSS color codes in stylesheets, gradients, borders, shadows, SVG, and interface design.Color Palette GeneratorGenerate color palettes from a base color, image, color wheel, harmony, shades, tints, and tones.Web Safe ColorsExplore web safe colors, classic browser-safe palettes, Hex values, and modern alternatives.Color Shades GeneratorCreate color shades, tints, tones, and variations from any Hex, RGB, HSL, or OKLCH color.