A toolkit for working with phylogenetic data.
v0.18.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
names.cpp File Reference
#include "genesis/utils/tools/color/names.hpp"
#include "genesis/utils/tools/color/functions.hpp"
#include "genesis/utils/text/string.hpp"
#include <algorithm>
#include <iterator>
#include <stdexcept>
#include <vector>

Go to the source code of this file.

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::utils
 

Typedefs

using NamedColorList = std::vector< std::pair< std::string, ColorBytes >>
 

Functions

Color color_from_name_web (std::string const &name)
 Retrieve a named web color by name. More...
 
Color color_from_name_xkcd (std::string const &name)
 Retrieve a named xkcd color by name. More...
 
std::vector< Color > color_palette_web ()
 
std::vector< Color > color_palette_xkcd ()
 
std::vector< Color > convert_to_palette_ (NamedColorList const &list)
 Local helper function to convert a list of byte colors into a proper Color vector. More...
 
NamedColorList::const_iterator get_color_list_iterator_ (NamedColorList const &list, std::string name)
 Internal helper function. More...
 
bool is_web_color_name (std::string const &name)
 Return true iff the given name is a named web color. More...
 
bool is_xkcd_color_name (std::string const &name)
 Return true iff the given name is a named xkcd color. More...
 

Variables

const NamedColorList color_list_web_
 Struct that stores a static const map of named web colors. More...
 
const NamedColorList color_list_xkcd_
 Struct that stores a static const map of named xkcd colors. More...