Euphoria
|
palette.h
Go to the documentation of this file.
20 // todo(Gustav): what is name used for? can we remove it and use a tostring on the palette_all enum?
Definition: argparse.cc:45
constexpr StaticPalette< sizeof...(T)> make_static_palette(const std::string_view &name, T... colors)
Definition: palette.h:92
Definition: assert.h:90
@ black
@ pure_purple
@ pure_green
@ blue
@ pure_orange
@ dark_gray
@ pink
@ tan
@ pure_red
@ light_blue
@ cyan
@ pure_pink
@ brown
@ pure_beige
@ pure_blue
@ light_gray
@ normal_blue
@ pure_cyan
@ pure_yellow
@ green
@ purple
@ cornflower_blue
@ red
@ light_green
@ pure_brown
@ gray
@ yellow
@ white
@ pure_tan
@ orange
Definition: angle.h:14
Definition: palette.h:101
static DynamicPalette create_rainbow(int count, float saturation=0.5f, float lightness=0.5f)
based on the r documentation https://rdrr.io/r/grDevices/palettes.html
Definition: palette.cc:90
DynamicPalette(const std::string &n, const Rgbi &c0, const R &... c)
Definition: palette.h:108
static DynamicPalette create_empty(const std::string &name)
Create a empty palette with a name.
Definition: palette.cc:83
Definition: palette.h:19
const Rgbi & get_safe_index(unsigned int i) const
Get a color based on the index.
Definition: palette.cc:32
int get_index_closest(const Rgbi &c) const
Definition: palette.cc:46
constexpr Palette(const std::string_view &n, const ranges::span< const Rgbi > &c)
Definition: palette.h:27
const Rgbi & get_closest_color(const Rgbi &c) const
Definition: palette.cc:39
Definition: palette.h:63
constexpr const Palette & operator*() const
Definition: palette.h:77
constexpr const Palette * operator->() const
Definition: palette.h:82
constexpr StaticPalette(std::string_view n, const std::array< const Rgbi, size > &c)
Definition: palette.h:69