#include <Pt/Gfx/Color.h>

8-bit ARGB color. More...

Detailed Description

Color is the packed ARGB value painters, pens, brushes, and 8-bit pixels use. It is not a pixel in an image and it does not refer to a buffer. Alpha is straight, not premultiplied. Channel accessors return 8-bit components. The three-argument constructor sets alpha to 255.

Convert to and from ColorF when float channels are required. Conversion clamps ColorF channels to the 8-bit range.

The example constructs an opaque red and a half-transparent blue.

Pt::Gfx::Color red(255, 0, 0);
Pt::Gfx::Color blue(128, 0, 0, 255);
8-bit ARGB color.
Definition Color.h:65