Class for saving color gradients (palettes) More...
#include <Color.h>
Class for saving color gradients (palettes)
The constructor takes two mandatory arguments:
Optionally you can specify:
The color gradient can be accessed by calling the methods GetPalette() or GetGradient() that will return a vector of type Int_t or Color_t respectively. If you are using the SetPalette() option that PlottI provides you can use the ColorGradient instance directly.
For a full list and preview of PlottI color gradients see Color Gradients in PlottI
Public Member Functions | |
| ColorGradient (Int_t nPoints, const vector< color > &rgbEndpoints, const vector< Double_t > &stops={}, Float_t alpha=1) | |
| Constructor. More... | |
| vector< Int_t > | GetPalette () |
| vector< Color_t > | GetGradient () |
| Int_t | GetNpoints () |
| ColorGradient::ColorGradient | ( | Int_t | nPoints, |
| const vector< color > & | rgbEndpoints, | ||
| const vector< Double_t > & | stops = {}, |
||
| Float_t | alpha = 1 |
||
| ) |
Constructor.
Generate color gradient with nPoints colors from rgbEndpoints alpha transparency.
| [in] | nPoints | Number of colors that will be generated from the color endpoints |
| [in] | rgbEndpoints | Color endpoints in RGB format using color structure |
| [in] | stops | Determines spacing of colors in gradient, if not given the colors will be spaced evenly |
| [in] | alpha | Determines alpha value of colors |
| vector< Color_t > ColorGradient::GetGradient | ( | ) |
Return stored palette as vector of Color_t
| Int_t ColorGradient::GetNpoints | ( | ) |
Return the number of color points of the stored palette
| vector< Int_t > ColorGradient::GetPalette | ( | ) |
Return stored palette as vector of Int_t
1.8.5