MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / RGB565

Method RGB565

libraries/Kelvin2RGB/Kelvin2RGB.cpp:167–176  ·  view source on GitHub ↗

16 bit colour - of last conversion.

Source from the content-addressed store, hash-verified

165// 16 bit colour - of last conversion.
166//
167uint16_t Kelvin2RGB::RGB565()
168{
169 uint16_t val = 0;
170 val = uint8_t(_red * 32);
171 val <<= 6;
172 val |= uint8_t(_green * 64);
173 val <<= 5;
174 val |= uint8_t(_blue * 32);
175 return val;
176}
177
178
179uint32_t Kelvin2RGB::CMYK()

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64