Adobe.ASE.load.js file which can load a Photoshop ASE color palette file from the server and convert it to
both a standard JS object hierarchy (which includes the group and color names) and a flattened array which can be fed
d3.scale.ordinal().range(...) for quick & easy as a color palette for d3.js visualizations.
ZERO server-side / developer / tool effort required to convert artist-created color palettes before those are usable in your web projects, particularly when you’re using D3.js to visualize your data.
Adobe Photoshop > Swatches > Save Swatches for Exchange > upload to server (static content) > use in any d3 visualization
Certainly. Get your derrière over to the Adobe Kuler web site to peruse a zillion color palettes created by the community.
And if that’s not enough, there’s a lot of color tools out there which produce ASE files for you to download: anyone who exports color templates for use in Photoshop is producing ASE files!
The code uses the excellent jDataview.js from Christopher Chedeau.
Using this is very simple:
make sure you’ve loaded both the
fetch the ASE file from your web store (server) using the API call:
adobe.ase.load(file, callback) where
callback can be any
function you specify. The callback function will receive up to 3 arguments: (palette, flat_rgb_set, error_msg).
callback.palette.arg.format.md file for the object hierarchy/format specification.
flat_rgb_set: a flat array containing one HTML color string in
#RRGGBB format for each color in the palette
error_msg: optional 3rd argument which will contain an error message when something went horribly wrong. In case of errors, both
flat_rgb_set are set to