← Back

ofxNamedColors

github.com/ofZach/ofxNamedColors · @ofZach
OF 0.7 Graphics

Defines 900+ named colors as static ofColor constants, adapted from Wikipedia's compact list of colors.

13 0 Last commit 14y ago Created 14y ago

README

ofxNamedColors



this comes from

http://en.wikipedia.org/wiki/List_of_colors_(compact)

with some modifications to the names to let them work as variable names. there's about 900+ named colors.

usage:

include "ofxNamedColors.h"



ofSetColor(ofxNamedColors::alloyOrange); ofSetColor(ofxNamedColors::classicRose);

everything is static inside the class. you can also use some helper functions for iterating through the whole list

setupColorMap(); // allocates the static map of name to ofColor and populated a vector of color/name mappings ofxNamedColors::colorNames // the vector of mappings.

etc.

the example shows you all the colors:

example pic

as well as lets you sort them by hue, which can be useful:

example pic

Get this addon

HTTPS
SSH