ofxAlbers
A colour addon for OpenFrameworks
|
Functionality for constructing colour schemes from dribbble shots via HTTP. Has a ofxGumbo dependency. Scrapes a dribbble project's URI and extracts the colour data based on their HTML schema. More...
#include <DribbblePalette.h>
Public Member Functions | |
SharedPtrColVec | createPalette (const string &_url) |
Main entry method to create colour schemes from Dribbble project palettes. Example url = https://dribbble.com/shots/2585138-Sunset-Badge. More... | |
DribbblePalette () | |
Construct an Dribbble Palette object. | |
DribbblePalette (const DribbblePalette &old) | |
DribbblePalette's copy constructor. | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
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. | |
Functionality for constructing colour schemes from dribbble shots via HTTP. Has a ofxGumbo dependency. Scrapes a dribbble project's URI and extracts the colour data based on their HTML schema.
SharedPtrColVec DribbblePalette::createPalette | ( | const string & | _url | ) |
Main entry method to create colour schemes from Dribbble project palettes. Example url = https://dribbble.com/shots/2585138-Sunset-Badge.
_url | The Dribbble project's URL. An example is "https://dribbble.com/shots/2585138-Sunset-Badge". |