Euphoria
eu::core::DynamicPalette Struct Reference

#include <palette.h>

Public Member Functions

template<typename... R>
 DynamicPalette (const std::string &n, const Rgbi &c0, const R &... c)
 
 DynamicPalette (const std::string &n, const std::vector< Rgbi > &c)
 
Palette to_palette () const
 

Static Public Member Functions

static DynamicPalette create_empty (const std::string &name)
 Create a empty palette with a name. More...
 
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 More...
 
static DynamicPalette create_rainbow (int count, const Angle &from, const Angle &to, float saturation, float lightness)
 based on the r documentation https://rdrr.io/r/grDevices/palettes.html More...
 

Public Attributes

std::string name
 
std::vector< Rgbicolors
 list of the colors More...
 

Detailed Description

Definition at line 100 of file palette.h.

Constructor & Destructor Documentation

◆ DynamicPalette() [1/2]

template<typename... R>
eu::core::DynamicPalette::DynamicPalette ( const std::string &  n,
const Rgbi c0,
const R &...  c 
)
inline

Definition at line 108 of file palette.h.

◆ DynamicPalette() [2/2]

eu::core::DynamicPalette::DynamicPalette ( const std::string &  n,
const std::vector< Rgbi > &  c 
)

Definition at line 75 of file palette.cc.

Member Function Documentation

◆ create_empty()

DynamicPalette eu::core::DynamicPalette::create_empty ( const std::string &  name)
static

Create a empty palette with a name.

Parameters
namethe name of the palette
Returns
a empty palette

Definition at line 83 of file palette.cc.

◆ create_rainbow() [1/2]

DynamicPalette eu::core::DynamicPalette::create_rainbow ( int  count,
const Angle from,
const Angle to,
float  saturation,
float  lightness 
)
static

based on the r documentation https://rdrr.io/r/grDevices/palettes.html

Definition at line 107 of file palette.cc.

◆ create_rainbow() [2/2]

DynamicPalette eu::core::DynamicPalette::create_rainbow ( int  count,
float  saturation = 0.5f,
float  lightness = 0.5f 
)
static

based on the r documentation https://rdrr.io/r/grDevices/palettes.html

Definition at line 90 of file palette.cc.

◆ to_palette()

Palette eu::core::DynamicPalette::to_palette ( ) const

Definition at line 69 of file palette.cc.

Member Data Documentation

◆ colors

std::vector<Rgbi> eu::core::DynamicPalette::colors

list of the colors

Definition at line 105 of file palette.h.

◆ name

std::string eu::core::DynamicPalette::name

Definition at line 102 of file palette.h.


The documentation for this struct was generated from the following files: