- BlendAdd
alias BlendAdd(T) = BlendImpl!(BlendFactor.One, BlendFactor.One, T)
Undocumented in source.
- BlendAddAlpha
alias BlendAddAlpha(T) = BlendImpl!(BlendFactor.SrcAlpha, BlendFactor.One, T)
Undocumented in source.
- BlendAddMul
alias BlendAddMul(T) = BlendImpl!(BlendFactor.OneMinusDstColor, BlendFactor.One, T)
Undocumented in source.
- BlendAlpha
alias BlendAlpha(T) = BlendImpl!(BlendFactor.SrcAlpha, BlendFactor.OneMinusSrcAlpha, T)
Undocumented in source.
- BlendMultiply
alias BlendMultiply(T) = BlendImpl!(BlendFactor.DstColor, BlendFactor.Zero, T)
Undocumented in source.
- BlendSrc2DST
alias BlendSrc2DST(T) = BlendImpl!(BlendFactor.SrcColor, BlendFactor.One, T)
Undocumented in source.
- FuncBlend
alias FuncBlend(T) = Color!T function(Color!T, Color!T) @(safe) nothrow pure
Undocumented in source.
- mix
alias mix(T) = BlendMultiply!T
Undocumented in source.
- BlendFunc
FuncBlend!T BlendFunc(int fac1, int fac2)
Returns a reference to a function that implements mixing two colors
by mixing factors.
- BlendImpl
Color!T BlendImpl(Color!T orig, Color!T color)
Color mixing implementations.
- convert
Color!To convert(Color!From color)
Converts one sample color to another.
- fromColor
Color!ubyte fromColor(ubyte[] bytes)
Will change the byte sequence to color.
- fromColors
Color!ubyte[] fromColors(ubyte[] bytes)
Will change the sequence of bytes into a collection of colors.
- fromFormat
ubyte[] fromFormat(ubyte[] pixels)
Converts the format of a sequence of color bytes.
- hexTo
T hexTo(R hexData)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseColor
Color!C parseColor(T hex)
Recognizes a hex format string, converting it to RGBA representation as a
Color!ubyte structure.
- rgb
Color!ubyte rgb(ubyte red, ubyte green, ubyte blue)
- rgb
Color!ubyte rgb(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
- rgba
Color!ubyte rgba(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
- rgba
Color!ubyte rgba(ubyte red, ubyte green, ubyte blue, ubyte alpha)
- validateBytes
bool validateBytes(inout(ubyte[]) pixels)
Checks if the byte array is valid for the color description.
Color manipulation module. Mixing, converting, parsing colors.
For mixing use implementations: BlendImpl, using you will get the desired mixing result as a function. An example would be the simplest blending by alpha value:
If you need to convert a set of bytes to a set of colors, use the fromColors function.