6Color transparent = color::Transparent;
11 for (
int i = 0; i < palette_size; ++i) {
46 std::unique_ptr<internal::PaletteIndex> index(
53 std::unique_ptr<internal::PaletteIndex> index(
65 if (
itr != index_->end())
return *
itr;
70 if (
color.a() != 0xFF) {
ARGB8888 color stored as a 32-bit unsigned integer.
Palette storage for IndexedN color modes.
const Color * colors() const
Return pointer to the color table.
uint8_t getIndexOfColor(Color color)
Return the index of a specified color.
static Palette ReadWrite(const Color *colors, int size)
Create a read/write palette backed by the given colors.
int size() const
Return palette size.
Palette()
Create a dummy palette with a single transparent color.
static Palette ReadOnly(const Color *colors, int size)
Create a read-only palette backed by the given colors.
TransparencyMode transparency_mode() const
Return palette transparency mode.
static Palette Dynamic(int max_size)
Create a dynamic palette for drawing to offscreens.
Defines 140 opaque HTML named colors.
TransparencyMode
Transparency information for a stream or color mode.
@ kNone
All colors are fully opaque.
@ kCrude
Colors are either fully opaque or fully transparent.
@ kFull
Colors may include partial transparency (alpha channel).