Module dither::color::palette[][src]

Modules

cga

built-in CGA palette; equivalent to cga.plt

crayon

built-in CRAYON palette; equivalent to crayon.plt

Functions

parse

parse a palette, specified as 6-digit hexidecimal RGB values (w/ optional 0x prefix) separated by newlines. lines consisting entirely of whitespace or starting with // are ignored. /// don’t forget to include at least two colors (probably including one of WHITE (0xffffff) or BLACK(0xffffff))

quantize

create a quantization function from the specified palette, returning the pair (nearest_neighbor, dist_from_neighbor)

Type Definitions

Palette