The OpenD Programming Language

std.experimental.color.rgb

This module implements the RGB _color type.

RGB is the most common expression of colors used in computing, where a _color is specified as some amount of red, green and blue primaries.

RGB is highly parametric, and comes in many shapes and sizes, with the most common being sRGB, which is conventionally used on computer monitors, and standard for use on the web.

RGB colors require the RGB _color space parameters to be defined to be considered 'absolute' colors.

Members

Enums

isRGB
eponymoustemplate isRGB(T)

Detect whether T is an RGB color.

Functions

toGamma
T toGamma(T v)

Convert a value to gamma compressed space.

toGamma
auto toGamma(C color)

Convert a color to gamma space.

toLinear
T toLinear(T v)

Convert a value from gamma compressed space to linear.

toLinear
auto toLinear(C color)

Convert a color to linear space.

Structs

RGB
struct RGB(string components_, ComponentType_, bool linear_ = false, RGBColorSpace colorSpace_ = RGBColorSpace.sRGB)

An RGB color, parameterised with components, component type, and color space specification.

Meta

Authors

Manu Evans