colourToBytes

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

Examples

assert(colourToBytes(BGR555(9, 29, 31)) == [0xA9, 0x7F]);
assert(colourToBytes(BGR565(9, 58, 31)) == [0x49, 0xFF]);
assert(colourToBytes(RGB888(72, 232, 248)) == [72, 232, 248]);

Meta