Top of the inheritance chain, describes a colour palette.
More...
#include <ColourPalette.h>
|
| ColourPalette () |
| Constructor used to instantiate member objects, viz. 'colours'.
|
|
| ColourPalette (const ColourPalette &old) |
| ABS's copy constructor. Creates a 'unique' shared pointer from the old one as we don't want it to point to the previous instantiation's 'colours'.
|
|
void | operator= (const ColourPalette &old) |
| ABS's assignment operator. Creates a 'unique' shared pointer from the old one as we don't want it to point to the previous instantiation's 'colours'.
|
|
SharedPtrColVec | getPalette () const |
| Generic colour scheme getter. Returns a shared pointer to the colour scheme itself. More...
|
|
void | sortPalette (string channel="hue") |
| Used to sort the palette of colours based on chosen channel. More...
|
|
void | darken (unsigned int percent) |
| Used to darken a colour scheme by a given percentage. More...
|
|
void | lighten (unsigned int percent) |
| Used to lighten a colour scheme by a given percentage. More...
|
|
void | saturate (unsigned int percent) |
| Used to saturate a colour scheme by a given percentage. More...
|
|
void | desaturate (unsigned int percent) |
| Used to desaturate a colour scheme by a given percentage. More...
|
|
void | adjustHue (int percent) |
| Used to adjust the hue by a given percentage - n.b. can be a negative value. More...
|
|
|
static ofColor | darken (ofColor &col, unsigned int percent) |
| Used to darken a colour by a given percentage. More...
|
|
static ofColor | lighten (ofColor &col, unsigned int percent) |
| Used to lighten a colour by a given percentage. More...
|
|
static ofColor | saturate (ofColor &col, unsigned int percent) |
| Used to saturate a colour by a given percentage. More...
|
|
static ofColor | desaturate (ofColor &col, unsigned int percent) |
| Used to desaturate a colour by a given percentage. More...
|
|
static ofColor | adjustHue (ofColor &col, int percent) |
| Used to adjust the hue by a given percentage - n.b. can be a negative value. More...
|
|
|
SharedPtrColVec | colours |
| stores the of representation of the generated colours.
|
|
ofColor | seedColour = ofColor(255, 255, 255) |
| the base colour with which to generate a scheme from.
|
|
Top of the inheritance chain, describes a colour palette.
- Author
- James Oldfield.
void ColourPalette::adjustHue |
( |
int |
percent | ) |
|
Used to adjust the hue by a given percentage - n.b. can be a negative value.
- Parameters
-
percent | The percentage with which to change the colour by. |
ofColor ColourPalette::adjustHue |
( |
ofColor & |
col, |
|
|
int |
percent |
|
) |
| |
|
static |
Used to adjust the hue by a given percentage - n.b. can be a negative value.
- Parameters
-
col | A reference to the colour to be altered. |
percent | The percentage with which to change the colour by. |
- Returns
- The new colour, post-operation.
void ColourPalette::darken |
( |
unsigned int |
percent | ) |
|
Used to darken a colour scheme by a given percentage.
- Parameters
-
percent | The percentage with which to change the colour by. |
ofColor ColourPalette::darken |
( |
ofColor & |
col, |
|
|
unsigned int |
percent |
|
) |
| |
|
static |
Used to darken a colour by a given percentage.
STATIC COLOUR OPERATION FUNCTIONS
- Parameters
-
col | A reference to the colour to be altered. |
percent | The percentage with which to change the colour by. |
- Returns
- The new colour, post-operation.
STATIC COLOUR OPERATION FUNCTIONS
void ColourPalette::desaturate |
( |
unsigned int |
percent | ) |
|
Used to desaturate a colour scheme by a given percentage.
- Parameters
-
percent | The percentage with which to change the colour by. |
ofColor ColourPalette::desaturate |
( |
ofColor & |
col, |
|
|
unsigned int |
percent |
|
) |
| |
|
static |
Used to desaturate a colour by a given percentage.
- Parameters
-
col | A reference to the colour to be altered. |
percent | The percentage with which to change the colour by. |
- Returns
- The new colour, post-operation.
SharedPtrColVec ColourPalette::getPalette |
( |
| ) |
const |
Generic colour scheme getter. Returns a shared pointer to the colour scheme itself.
- Returns
- a shared pointer to the vector of ofColours.
void ColourPalette::lighten |
( |
unsigned int |
percent | ) |
|
Used to lighten a colour scheme by a given percentage.
- Parameters
-
percent | The percentage with which to change the colour by. |
ofColor ColourPalette::lighten |
( |
ofColor & |
col, |
|
|
unsigned int |
percent |
|
) |
| |
|
static |
Used to lighten a colour by a given percentage.
- Parameters
-
col | A reference to the colour to be altered. |
percent | The percentage with which to change the colour by. |
- Returns
- The new colour, post-operation.
void ColourPalette::saturate |
( |
unsigned int |
percent | ) |
|
Used to saturate a colour scheme by a given percentage.
- Parameters
-
percent | The percentage with which to change the colour by. |
ofColor ColourPalette::saturate |
( |
ofColor & |
col, |
|
|
unsigned int |
percent |
|
) |
| |
|
static |
Used to saturate a colour by a given percentage.
- Parameters
-
col | A reference to the colour to be altered. |
percent | The percentage with which to change the colour by. |
- Returns
- The new colour, post-operation.
void ColourPalette::sortPalette |
( |
string |
channel = "hue" | ) |
|
Used to sort the palette of colours based on chosen channel.
- Parameters
-
channel | The channel to sort by. |
The documentation for this class was generated from the following files: