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.

toGrayscale
T toGrayscale(T r, T g, T b)
Undocumented in source. Be warned that the author may not have intended to support it.
toGrayscale
T toGrayscale(T r, T g, T b)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

Templates

allIn
template allIn(string s, string chars)
Undocumented in source.
anyIn
template anyIn(string s, string chars)
Undocumented in source.
canFind
template canFind(string s, char c)
Undocumented in source.
defaultAlpha
template defaultAlpha(T)
Undocumented in source.
notIn
template notIn(string s, string chars)
Undocumented in source.

Meta

Authors

Manu Evans