colourToBytes

Undocumented in source. Be warned that the author may not have intended to support it.
  1. ubyte[Format.sizeof] colourToBytes(Format data)
  2. ubyte[] colourToBytes(T red, T green, T blue, SupportedFormat format)
    ubyte[]
    colourToBytes
    (
    T
    )
  3. ubyte[] colourToBytes(T data, SupportedFormat format)

Examples

assert(colourToBytes(9, 29, 31, SupportedFormat.bgr555) == [0xA9, 0x7F]);
assert(colourToBytes(72, 232, 248, SupportedFormat.rgb888) == [72, 232, 248]);

Meta