A toolkit for working with phylogenetic data.
v0.20.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
names.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_UTILS_TOOLS_COLOR_NAMES_H_
2 #define GENESIS_UTILS_TOOLS_COLOR_NAMES_H_
3 
4 /*
5  Genesis - A toolkit for working with phylogenetic data.
6  Copyright (C) 2014-2018 Lucas Czech and HITS gGmbH
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>.
20 
21  Contact:
22  Lucas Czech <lucas.czech@h-its.org>
23  Exelixis Lab, Heidelberg Institute for Theoretical Studies
24  Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
25 */
26 
35 
36 #include <utility>
37 #include <string>
38 #include <vector>
39 
40 namespace genesis {
41 namespace utils {
42 
43 // =================================================================================================
44 // Color Names
45 // =================================================================================================
46 
51 bool is_color_name( std::string const& name );
52 
57 Color color_from_name( std::string const& name );
58 
59 // =================================================================================================
60 // Color Names Web
61 // =================================================================================================
62 
63 std::vector<Color> color_palette_web();
64 
70 bool is_web_color_name( std::string const& name );
71 
78 Color color_from_name_web( std::string const& name );
79 
80 // =================================================================================================
81 // Color Names xkcd
82 // =================================================================================================
83 
84 std::vector<Color> color_palette_xkcd();
85 
92 bool is_xkcd_color_name( std::string const& name );
93 
106 Color color_from_name_xkcd( std::string const& name );
107 
108 } // namespace utils
109 } // namespace genesis
110 
111 #endif // include guard
bool is_xkcd_color_name(std::string const &name)
Return true iff the given name is a named xkcd color.
Definition: names.cpp:1281
Header of Color class.
bool is_web_color_name(std::string const &name)
Return true iff the given name is a named web color.
Definition: names.cpp:1256
bool is_color_name(std::string const &name)
Return true if the name represents one of the named colors offered by genesis, which is (currently) a...
Definition: names.cpp:1229
Color color_from_name_xkcd(std::string const &name)
Retrieve a named xkcd color by name.
Definition: names.cpp:1286
Color color_from_name(std::string const &name)
Return the color represented by the given name, which is (currently) a shortcut for color_from_name_w...
Definition: names.cpp:1240
Color color_from_name_web(std::string const &name)
Retrieve a named web color by name.
Definition: names.cpp:1261
std::vector< Color > color_palette_web()
Definition: names.cpp:1272
std::vector< Color > color_palette_xkcd()
Definition: names.cpp:1297