alias HCY = chsx.HCY!double

HCY colourspace

alias RGB = crgb.RGB!("rgb", double)

RGB colourspace

alias RGBA = crgb.RGB!("rgba", double)

RGBA colourspace

alias XYZ = cxyz.XYZ!double

XYZ colourspace

alias toColourSpace = cspace.convertColor

Convert to another colour space

alias isColour = cColor.isColor

Check whether it is a colour

public cairo.RGBA toCairoRGBA(C)(in C from)

Convert to Cairo colour

public C fromCairoRGBA(C)(in cairo.RGBA crgb)

Convert from Cairo colour to specified type (template)

public auto toTuple(T : HCY)(T colour)

Convert colour to a tuple holding the values

public auto toTuple(T : XYZ)(T colour)

Convert colour to a tuple holding the values

public auto toTuple(T)(T colour)

Convert colour to a tuple holding the values

This module mostly exist to have a bridge with the ggplotd code and the ggplotd.color code. That is because the ggplotd.color code might become part of phobos one day and I don't want to depend directly on ggplotd's implementation, so that it stays easy to switch to an alternative (phobos) based implementation.

Aliases

HCY
chsx.HCY!double

HCY colourspace

RGB
crgb.RGB!("rgb", double)

RGB colourspace

RGBA
crgb.RGB!("rgba", double)

RGBA colourspace

XYZ
cxyz.XYZ!double

XYZ colourspace

toColourSpace
cspace.convertColor

Convert to another colour space

isColour
cColor.isColor

Check whether it is a colour

Functions

toCairoRGBA

Convert to Cairo colour

fromCairoRGBA

Convert from Cairo colour to specified type (template)

autotoTuple

Convert colour to a tuple holding the values

autotoTuple

Convert colour to a tuple holding the values

autotoTuple

Convert colour to a tuple holding the values