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