#include <UT_Color.h>
|
| UT_Color () |
|
| UT_Color (UT_ColorType t) |
|
| UT_Color (UT_ColorType t, fpreal x, fpreal y, fpreal z) |
|
| UT_Color (const UT_Color &c) |
|
| UT_Color (const char *colorname) |
|
| ~UT_Color () |
|
UT_ColorType | getType () const |
|
void | getValue (float &x, float &y, float &z) const |
|
void | getValue (fpreal64 &x, fpreal64 &y, fpreal64 &z) const |
|
void | getRGB (float *r, float *g, float *b) const |
|
void | getHSV (float *h, float *s, float *v) const |
|
void | getHSL (float *h, float *s, float *l) const |
|
void | getXYZ (float *x, float *y, float *z) const |
|
void | getLAB (float *l, float *a, float *b) const |
|
void | getTMI (float *t, float *m, float *i) const |
|
void | getColor (UT_Color &c) const |
|
UT_Vector3F | rgb () const |
|
void | setRGB (UT_Vector3F c) |
|
void | setRGB (UT_Vector3D c) |
|
fpreal | luminance () const |
|
fpreal | relativeLuminance () const |
|
void | setType (UT_ColorType t) |
|
void | setValue (fpreal x, fpreal y, fpreal z) |
|
void | setRGB (fpreal r, fpreal g, fpreal b) |
|
void | setHSV (fpreal h, fpreal s, fpreal v) |
|
void | setHSL (fpreal h, fpreal s, fpreal l) |
|
void | setXYZ (fpreal x, fpreal y, fpreal z) |
|
void | setLAB (fpreal l, fpreal a, fpreal b) |
|
void | setLABluminance (fpreal l) |
|
void | setTMI (fpreal t, fpreal m, fpreal i) |
|
void | setUnique (int64 idx) |
|
void | setColorByName (const char *colorname) |
|
void | clampToLegal () |
|
void | ghost (fpreal gfactor=0.75f) |
|
UT_Color | copyGhosted (fpreal gfactor=0.75f) const |
|
void | operator= (const UT_Color &c) |
|
int | operator== (const UT_Color &color) const |
|
int | operator!= (const UT_Color &c) const |
|
bool | operator< (const UT_Color &b) const |
|
uint32 | hash () const |
|
void | brighten (fpreal amount) |
|
void | tintRGB (const UT_Color &clr) |
|
void | addHSV (const UT_Color &clr) |
|
void | addRGB (const UT_Color &clr) |
|
void | subRGB (const UT_Color &clr) |
|
UT_Color | copyWithGamma (fpreal gamma) const |
|
void | gamma (fpreal gamma) |
|
void | blendRGB (const UT_Color &clr, fpreal bias=0.5) |
|
int | save (std::ostream &os, int binary) const |
|
void | saveMinimalAsText (std::ostream &os) const |
|
bool | load (UT_IStream &is) |
|
const char * | className () const |
|
|
bool | save (UT_JSONWriter &w) const |
|
bool | save (UT_JSONValue &v) const |
|
bool | load (UT_JSONParser &p) |
|
UT_Color::UT_Color |
( |
const char * |
colorname | ) |
|
|
explicit |
Builds a UT_Ramp to correspond to the given internal ramp.
void UT_Color::clampToLegal |
( |
| ) |
|
const char* UT_Color::className |
( |
| ) |
const |
|
inline |
void UT_Color::convertToHSL |
( |
| ) |
|
|
protected |
void UT_Color::convertToHSV |
( |
| ) |
|
|
protected |
void UT_Color::convertToLAB |
( |
| ) |
|
|
protected |
void UT_Color::convertToRGB |
( |
| ) |
|
|
protected |
void UT_Color::convertToTMI |
( |
| ) |
|
|
protected |
void UT_Color::convertToXYZ |
( |
| ) |
|
|
protected |
Computes a ramp colour from the predefined ramp enums.
Return the name of the ramp colour.
Obtain a random color that is contrasting to the specified other color. If null is passed for other color, a random color is returned.
A mapping from integers to colours that tries to ensure that the chosen colours are well separated and aesthetically pleasing.
uint32 UT_Color::hash |
( |
| ) |
const |
Methods to serialize to a JSON stream. The color is stored as a map:
"type" : "color space",
"data" : [
x,
y,
z, ... ]
fpreal UT_Color::luminance |
( |
| ) |
const |
luminance() actually returns "luma", an approximation of luminance derived from the gamma corrected rgb values. So if you have linear rgb values and call this function, you will get the wrong result.
fpreal UT_Color::relativeLuminance |
( |
| ) |
const |
int UT_Color::save |
( |
std::ostream & |
os, |
|
|
int |
binary |
|
) |
| const |
Methods to serialize to a JSON stream. The color is stored as a map:
"type" : "color space",
"data" : [
x,
y,
z, ... ]
Methods to serialize to a JSON stream. The color is stored as a map:
"type" : "color space",
"data" : [
x,
y,
z, ... ]
void UT_Color::saveMinimalAsText |
( |
std::ostream & |
os | ) |
const |
void UT_Color::setColorByName |
( |
const char * |
colorname | ) |
|
The documentation for this class was generated from the following file: