Utility functions related to colors.
More...
#include <Colors.h>
|
static std::vector< std::string > | getList () |
| Get a list of useful colors.
|
|
static double | hueToRgb (double p, double q, double t) |
| Transforms a Color given in the HLS System to RGB.
|
|
static std::array< double, 3 > | hlsToRgb (double h, double l, double s) |
| Transforms a Color given in the HLS System to RGB. More...
|
|
static std::string | getWheelColor (int degree) |
| Get a color from the wheel of colors. More...
|
|
Utility functions related to colors.
Definition at line 22 of file Colors.h.
◆ getWheelColor()
std::string getWheelColor |
( |
int |
degree | ) |
|
|
static |
Get a color from the wheel of colors.
- Parameters
-
degree | the degree viewed form the center of the color wheel (greater 0) |
Definition at line 71 of file Colors.cc.
73 double hue(degree % 360 / 360.);
74 double saturation = 0.75;
75 double lightness = 0.5;
78 std::ostringstream oss;
79 oss <<
"rgb(" << rgb[0] * 100 <<
"%, " << rgb[1] * 100 <<
"%, " << rgb[2] * 100 <<
"%)";
static std::array< double, 3 > hlsToRgb(double h, double l, double s)
Transforms a Color given in the HLS System to RGB.
◆ hlsToRgb()
std::array< double, 3 > hlsToRgb |
( |
double |
h, |
|
|
double |
l, |
|
|
double |
s |
|
) |
| |
|
static |
Transforms a Color given in the HLS System to RGB.
- Parameters
-
h | Hue ranging from 0 to 1. |
l | Lighness. |
s | Saturation. |
- Returns
- Array containing rgb-values in the order red, green, blue.
Definition at line 56 of file Colors.cc.
The documentation for this class was generated from the following files:
- tracking/trackFindingCDC/display/include/Colors.h
- tracking/trackFindingCDC/display/src/Colors.cc