Empirical
Namespaces | Functions
color_map.h File Reference

Tools to dynamically build (and cache) color maps. More...

#include <iomanip>
#include <map>
#include <string>
#include <tuple>
#include "../base/vector.h"
#include "../tools/string_utils.h"

Go to the source code of this file.

Namespaces

 emp
 If we are in emscripten, make sure to include the header.
 

Functions

std::string emp::ColorHSL (double h, double s, double l)
 Generate a string to describe a JS color out of HSL values. More...
 
std::string emp::ColorRGB (int r, int g, int b)
 Generate a string to describe a JS color out of RGB values. More...
 
std::string emp::ColorRGB (int r, int g, int b, double a)
 Generate a string to describe a JS color with an alpha channel. More...
 
const emp::vector< std::string > & emp::GetHueMap (size_t map_size, double min_h=0.0, double max_h=360.0, int s=100, int l=50)
 
emp::vector< std::string > emp::GetHSLMap (size_t map_size, double min_h=0.0, double max_h=360.0, int min_s=100, int max_s=100, int min_l=50, int max_l=50)
 Generate a vector of color strings providing ranges of all of hue, satuation and luminosity. More...
 

Detailed Description

Tools to dynamically build (and cache) color maps.

Note
This file is part of Empirical, https://github.com/devosoft/Empirical
Date
2015-2017