Skip to content


The sRGB color space is registered in Color by default


Name: srgb

White Point: D65 / 2˚


Name Range*
r [0, 1]
g [0, 1]
b [0, 1]

* Range denotes in gamut colors, but the color space supports an extended range beyond the gamut.


CIE 1931 xy Chromaticity – sRGB Chromaticities

The sRGB space is a standard RGB (red, green, blue) color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the Web. sRGB stands for "Standard RGB". It is the most widely used color space and is supported by most operating systems, software programs, monitors, and printers.

Learn about sRGB

Channel Aliases

Channels Aliases
r red
g green
b blue


Parsed input and string output formats support all valid CSS forms:

black                  // Color name
#RRGGBBAA              // Hex
rgb(r g b / a)         // RGB function
rgb(r, g, b)           // Legacy RGB Function
rgba(r, g, b, a)       // Legacy RGBA function
color(srgb r g b / a)  // Color function

When manually creating a color via raw data or specifying a color space as a parameter in a function, the color space name is always used:

Color("srgb", [0, 0, 0], 1)
The string representation of the color object will always default to the color(srgb r g b / a) form, but the default string output will be the rgb(r g b / a) form.

>>> Color('red').to_string()
'rgb(255 0 0)'
>>> Color('orange').to_string(comma=True)
'rgb(255, 165, 0)'
>>> Color('yellow').to_string(percent=True)
'rgb(100% 100% 0%)'
>>> Color('green').to_string(names=True)
>>> Color('blue').to_string(hex=True)
>>> Color('indigo').to_string(color=True)
'color(srgb 0.29412 0 0.5098)'


from coloraide import Color as Base
from coloraide.spaces.srgb.css import sRGB

class Color(Base): ...


Last update: September 10, 2023