color_map.hpp

Tools to dynamically build (and cache) color maps.

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2015-2017 Michigan State University MIT Software license; see doc/LICENSE.md

Defines

INCLUDE_EMP_WEB_COLOR_MAP_HPP_GUARD

Functions

std::string ColorHSL(double h, double s, double l)

Generate a string to describe a JS color out of HSL values.

std::string ColorRGB(int r, int g, int b)

Generate a string to describe a JS color out of RGB values.

std::string ColorRGB(int r, int g, int b, double a)

Generate a string to describe a JS color with an alpha channel.

std::string ColorHSV(double h, double s, double v)

Generate a string to describe a JS color out of HSV values.

const vector<std::string> &GetHueMap(size_t map_size, double min_h = 0.0, double max_h = 360.0, int s = 100, int l = 50)

Generate a vector of color strings with a specified range of hues, and fixed saturation and luminosity,

vector<std::string> 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, saturation and luminosity.