colors.colorspace

This module defines "standard" colorspace compatible with typical D library with implicit sRGB and then adds colorspace as defined by CSS.

Members

Enums

Colorspace
enum Colorspace

The Predefined Color Spaces. For now, no custom space.

Structs

HSLAf
struct HSLAf

A 32-bit float Hue Saturation Luminance space that is based-upon sRGB. "hsl" in CSS. Warning: h is in a degrees modulo space (0 to 360) s, l and a have a range 0 to 1. All can be float.nan ("none" in CSS).

L8
struct L8

A 8-bit luminance sRGB value.

LA8
struct LA8

A 8-bit luminance sRGB value, with alpha.

RGB16
struct RGB16

A 16-bit tristimulus sRGB color. TODO: rgb16 convenience function to create one such color.

RGB8
struct RGB8

A 8-bit tristimulus sRGB color. TODO: rgb8 convenience function to create one such color.

RGBA16
struct RGBA16

A 16-bit tristimulus sRGB color, with alpha. This is the most common encoding, and is here to avoid needless conversion for this case. TODO: rgba16 convenience function to create one such color.

RGBA8
struct RGBA8

A 8-bit tristimulus sRGB color, with alpha. This is the most common encoding, and is here to avoid needless conversion for this case. TODO: rgba8 convenience function to create one such color.

RGBAf
struct RGBAf

A 32-bit float tristimulus sRGB color, with alpha. This is the most common encoding, and is here to avoid needless conversion for this case. This is what most CSS functions resolve to, because of precision needs. Warning: r, g and b have a range 0 to 1, unlike in CSS. but a has a range 0 to 1. All can be float.nan ("none" in CSS).

Meta