Skip to content

Prismatic

The oRGB color space is not registered in Color by default

Properties

Name: prismatic

White Point: D65 / 2˚

Coordinates:

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

Prismatic

Prismatic Illustrations

The Prismatic model introduces a simple transform of the RGB color cube into a light/dark dimension and a 2D hue. The hue is a normalized (barycentric)triangle with pure red, green, and blue at the vertices, often called the Maxwell Color Triangle. Each cross section of the space is the same barycentric triangle, and the light/dark dimension runs zero to one for each hue so the whole color volume takes the form of a prism.

Learn more.

Channel Aliases

Channels Aliases
l lightness
r red
g green
b blue

Input/Output

The Prismatic space is not currently supported in the CSS spec, the parsed input and string output formats use the color() function format using the custom name --prismatic:

color(--prismatic l r g b / a)  // Color function

The string representation of the color object and the default string output use the color(--prismatic l r g b / a) form.

>>> Color("prismatic", [1, 1, 0, 0])
color(--prismatic 1 1 0 0 / 1)
>>> Color("prismatic", [1, 0.60714, 0.39286, 0], 1).to_string()
'color(--prismatic 1 0.60714 0.39286 0)'

Registering

from coloraide import Color as Base
from coloraide.spaces.prismatic import Prismatic

class Color(Base): ...

Color.register(Prismatic())