A toolkit for working with phylogenetic data.
v0.18.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-2017 Lucas Czech
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 
52 bool is_web_color_name( std::string const& name );
53 
60 bool is_xkcd_color_name( std::string const& name );
61 
68 Color color_from_name_web( std::string const& name );
69 
82 Color color_from_name_xkcd( std::string const& name );
83 
84 std::vector<Color> color_palette_web();
85 std::vector<Color> color_palette_xkcd();
86 
87 } // namespace utils
88 } // namespace genesis
89 
90 #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:1234
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:1229
Color color_from_name_xkcd(std::string const &name)
Retrieve a named xkcd color by name.
Definition: names.cpp:1250
Color color_from_name_web(std::string const &name)
Retrieve a named web color by name.
Definition: names.cpp:1239
std::vector< Color > color_palette_web()
Definition: names.cpp:1261
std::vector< Color > color_palette_xkcd()
Definition: names.cpp:1266