Euphoria
colorbrewer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "core/palette.h"
4 
5 #include <map>
6 
7 
8 namespace eu::core
9 {
10  namespace colorbrewer
11  {
12  enum class BrewerType
13  {
14  div,
15  qual,
16  seq
17  };
18 
19  enum class BrewerClass
20  {
21  no = 0,
22  yes = 1,
23  maybe = 2
24  };
25 
26  using BlindProperties = std::vector<int>;
27  using PrintProperties = std::vector<int>;
28  using CopyProperties = std::vector<int>;
29  using ScreenProperties = std::vector<int>;
30 
31  struct Properties
32  {
37  };
38 
40  {
41  // todo(Gustav): move Properies here
43  };
44 
45  using SizeToPaletteMap = std::map<int, BrewerPalette>;
46 
47  struct Colorbrewer
48  {
49  std::string name;
53  };
54 
56  {
57  std::string name;
59  };
60  }
61 
62  namespace colorbrewer
63  {
64  const std::vector<Colorbrewer>&
66 
67  std::vector<SinglePalette>
68  find_palette(BrewerType* type, int* size);
69 
70  /*** Diverging ***/
71  const Colorbrewer& get_palette_diverging_spectral();
72  const Colorbrewer& get_palette_diverging_rd_yl_gn();
73  const Colorbrewer& get_palette_diverging_rd_bu();
74  const Colorbrewer& get_palette_diverging_pi_y_g();
75  const Colorbrewer& get_palette_diverging_p_r_gn();
76  const Colorbrewer& get_palette_diverging_rd_yl_bu();
77  const Colorbrewer& get_palette_diverging_br_b_g();
78  const Colorbrewer& get_palette_diverging_rd_gy();
79  const Colorbrewer& get_palette_diverging_pu_or();
80 
81  /*** Qualitative ***/
82  const Colorbrewer& get_palette_qualitative_set2();
83  const Colorbrewer& get_palette_qualitative_accent();
84  const Colorbrewer& get_palette_qualitative_set1();
85  const Colorbrewer& get_palette_qualitative_set3();
86  const Colorbrewer& get_palette_qualitative_dark2();
87  const Colorbrewer& get_palette_qualitative_paired();
88  const Colorbrewer& get_palette_qualitative_pastel2();
89  const Colorbrewer& get_palette_qualitative_pastel1();
90 
91  /*** Sequential ***/
92  const Colorbrewer& get_palette_sequential_or_rd();
93  const Colorbrewer& get_palette_sequential_pu_bu();
94  const Colorbrewer& get_palette_sequential_bu_pu();
95  const Colorbrewer& get_palette_sequential_oranges();
96  const Colorbrewer& get_palette_sequential_bu_gn();
97  const Colorbrewer& get_palette_sequential_yl_or_br();
98  const Colorbrewer& get_palette_sequential_yl_gn();
99  const Colorbrewer& get_palette_sequential_reds();
100  const Colorbrewer& get_palette_sequential_rd_pu();
101  const Colorbrewer& get_palette_sequential_greens();
102  const Colorbrewer& get_palette_sequential_yl_gn_bu();
103  const Colorbrewer& get_palette_sequential_purples();
104  const Colorbrewer& get_palette_sequential_gn_bu();
105  const Colorbrewer& get_palette_sequential_greys();
106  const Colorbrewer& get_palette_sequential_yl_or_rd();
107  const Colorbrewer& get_palette_sequential_pu_rd();
108  const Colorbrewer& get_palette_sequential_blues();
109  const Colorbrewer& get_palette_sequential_pu_bu_gn();
110  }
111 }
const std::vector< Colorbrewer > & get_all_palettes()
Definition: colorbrewer.cc:28
const Colorbrewer & get_palette_sequential_blues()
const Colorbrewer & get_palette_sequential_yl_or_rd()
std::vector< int > BlindProperties
Definition: colorbrewer.h:26
const Colorbrewer & get_palette_diverging_rd_yl_bu()
const Colorbrewer & get_palette_sequential_greys()
const Colorbrewer & get_palette_sequential_yl_gn_bu()
const Colorbrewer & get_palette_sequential_bu_gn()
const Colorbrewer & get_palette_qualitative_paired()
const Colorbrewer & get_palette_qualitative_pastel2()
const Colorbrewer & get_palette_sequential_greens()
std::vector< int > ScreenProperties
Definition: colorbrewer.h:29
const Colorbrewer & get_palette_diverging_pu_or()
const Colorbrewer & get_palette_diverging_spectral()
Definition: colorbrewer.cc:83
const Colorbrewer & get_palette_diverging_pi_y_g()
Definition: colorbrewer.cc:688
const Colorbrewer & get_palette_diverging_p_r_gn()
Definition: colorbrewer.cc:890
const Colorbrewer & get_palette_sequential_bu_pu()
const Colorbrewer & get_palette_sequential_pu_bu()
const Colorbrewer & get_palette_sequential_pu_rd()
const Colorbrewer & get_palette_qualitative_set3()
std::vector< SinglePalette > find_palette(BrewerType *type, int *size)
Definition: colorbrewer.cc:49
const Colorbrewer & get_palette_diverging_rd_bu()
Definition: colorbrewer.cc:486
const Colorbrewer & get_palette_diverging_rd_gy()
const Colorbrewer & get_palette_sequential_yl_gn()
std::vector< int > CopyProperties
Definition: colorbrewer.h:28
std::map< int, BrewerPalette > SizeToPaletteMap
Definition: colorbrewer.h:45
const Colorbrewer & get_palette_qualitative_accent()
const Colorbrewer & get_palette_sequential_rd_pu()
const Colorbrewer & get_palette_qualitative_set1()
std::vector< int > PrintProperties
Definition: colorbrewer.h:27
const Colorbrewer & get_palette_sequential_purples()
const Colorbrewer & get_palette_qualitative_set2()
const Colorbrewer & get_palette_sequential_yl_or_br()
const Colorbrewer & get_palette_sequential_oranges()
const Colorbrewer & get_palette_diverging_rd_yl_gn()
Definition: colorbrewer.cc:284
const Colorbrewer & get_palette_diverging_br_b_g()
const Colorbrewer & get_palette_sequential_reds()
const Colorbrewer & get_palette_qualitative_dark2()
const Colorbrewer & get_palette_sequential_pu_bu_gn()
const Colorbrewer & get_palette_qualitative_pastel1()
const Colorbrewer & get_palette_sequential_gn_bu()
const Colorbrewer & get_palette_sequential_or_rd()