Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
|
for 5-6-5 coded colours = 64K colours More...
#include <hV_Colours565.h>
Public Member Functions | |
hV_Colours565 () | |
Constructor. | |
Colours utilities | |
| |
uint16_t | calculate (uint8_t red, uint8_t green, uint8_t blue) |
Calculate 16-bit colour from 8-bit Red-Green-Blue components. | |
void | split (uint16_t rgb, uint8_t &red, uint8_t &green, uint8_t &blue) |
Calculate 8-bit Red-Green-Blue components from 16-bit colour. | |
uint16_t | halve (uint16_t rgb) |
Half 16-bit colour. | |
uint16_t | average (uint16_t rgb1, uint16_t rgb2) |
Average two 16-bit colours. | |
uint16_t | weightedAverage (uint16_t rgb1, uint8_t weight1, uint16_t rgb2, uint8_t weight2) |
Weighted-average two 16-bit colours. | |
uint16_t | reverse (uint16_t rgb) |
Reverse 16-bit colour. | |
uint16_t | code (uint8_t value09) |
Return 16-bit colour from international colour code. | |
Static Public Attributes | |
Colours constants | |
| |
static const uint16_t | black = 0b0000000000000000 |
black | |
static const uint16_t | white = 0b1111111111111111 |
white | |
static const uint16_t | red = 0b1111100000000000 |
red | |
static const uint16_t | green = 0b0000011111100000 |
green | |
static const uint16_t | blue = 0b0000000000011111 |
blue | |
static const uint16_t | yellow = 0b1111111111100000 |
yellow | |
static const uint16_t | cyan = 0b0000011111111111 |
cyan | |
static const uint16_t | orange = 0b1111101111100000 |
orange | |
static const uint16_t | magenta = 0b1111100000001111 |
magenta | |
static const uint16_t | violet = 0b1111100000011111 |
violet | |
static const uint16_t | grey = 0b0111101111101111 |
grey | |
static const uint16_t | darkGrey = 0b0011100111100111 |
dark grey | |
static const uint16_t | brown = 0b0111100000000000 |
brown | |
static const uint16_t | gray = 0b0111101111101111 |
American-English variants. | |
static const uint16_t | darkGray = 0b0011100111100111 |
American-English variant for dark grey. | |
static const uint16_t | darkRed = 0b0011100000000000 |
dark red for BWR and BWRY colour screens | |
static const uint16_t | lightRed = 0b1111100011100011 |
light red for BWR and BWRY colour screens | |
static const uint16_t | darkYellow = 0b0011100011100000 |
dark yellow for BWRY colour screens | |
static const uint16_t | lightYellow = 0b1111111111100011 |
light yellow for BWRY colour screens | |
for 5-6-5 coded colours = 64K colours
red: 5 bits, green: 6 bits, blue: 5 bits
uint16_t hV_Colours565::average | ( | uint16_t | rgb1, |
uint16_t | rgb2 ) |
Average two 16-bit colours.
rgb1 | first 16-bit colour |
rgb2 | second 16-bit colour |
More: Colours
uint16_t hV_Colours565::calculate | ( | uint8_t | red, |
uint8_t | green, | ||
uint8_t | blue ) |
Calculate 16-bit colour from 8-bit Red-Green-Blue components.
red | red component, 0x00..0xff |
green | green component, 0x00..0xff |
blue | blue component, 0x00..0xff |
More: Colours
uint16_t hV_Colours565::code | ( | uint8_t | value09 | ) |
Return 16-bit colour from international colour code.
value09 | 0..9 for normal colours, 10..19 for dark colours |
More: Colours
uint16_t hV_Colours565::halve | ( | uint16_t | rgb | ) |
Half 16-bit colour.
rgb | 16-bit colour |
More: Colours
uint16_t hV_Colours565::reverse | ( | uint16_t | rgb | ) |
Reverse 16-bit colour.
rgb | 16-bit colour |
More: Colours
void hV_Colours565::split | ( | uint16_t | rgb, |
uint8_t & | red, | ||
uint8_t & | green, | ||
uint8_t & | blue ) |
Calculate 8-bit Red-Green-Blue components from 16-bit colour.
rgb | 16-bit colour |
red | red component, 0x00..0xff |
green | green component, 0x00..0xff |
blue | blue component, 0x00..0xff |
More: Colours
uint16_t hV_Colours565::weightedAverage | ( | uint16_t | rgb1, |
uint8_t | weight1, | ||
uint16_t | rgb2, | ||
uint8_t | weight2 ) |
Weighted-average two 16-bit colours.
rgb1 | first 16-bit colour |
weight1 | weight of the first colour |
rgb2 | second 16-bit colour |
weight2 | weight of the second colour |
More: Colours
|
static |
American-English variants.
American-English variant for grey