A color scheme importing library for Processing.
To download the library for use with Processing visit the website.
This allows you to load ColorSchemes in a number of ways:
- .xml files generated from paletton.com
- .ase files generated from Adobe products.
- by passing in an image file.
To use the library, instantiate a ColorScheme object in your setup() method like so:
ColorScheme colorScheme = new ColorScheme("theFileToLoad.xml", this);
Now you have access to the palette which you can get by calling:
colorScheme.getPalette();
Alternately, you can access a java.util.List of Color objects by calling:
colorScheme.getColors();
The colors can be accessed directly as a List of Integers by calling:
colorScheme.toIntegerArray();
If you prefer to work with primitive arrays. You can get an array of ints by calling:
colorScheme.toArray();
There is a script to run maven on the project, generate the documentation, and jar/zip everything up in the target directory.
To run it from the root directory of the project:
./build.sh
to install the library, unzip the archive in the target folder called ColorScheme.zip in the libraries folder of your Processing sketchbook.