Convert CSS palette files into Adobe Swatch Exchange (.ase) swatch palettes.
Includes:
- CLI — convert any CSS file on disk
- Eagle plugin — convert selected library CSS items, write a sidecar
.ase, and import it into the same folders/tags
Parser support matches eagle-palette-viewer: design-token ramps (--color-family-shade, --family-shade), flat exports, and related CSS palette formats.
npm test
node bin/convert-css-to-ase.js test/fixtures/colors.css
node bin/convert-css-to-ase.js theme.css --output ./Sample.ase --name SampleOr link the bin globally:
npm link
css-to-ase path/to/palette.cssSymlink this repo into Eagle's plugin directory:
ln -sfn "/path/to/eagle-css-to-ase" "$HOME/Library/Application Support/Eagle/Plugins/css-to-ase"Restart Eagle, select one or more .css palette files, open CSS to ASE, and click Convert selected.
The plugin writes {name}.ase beside each CSS file in the library item folder and imports it into Eagle. If an .ase item already exists at that path, it replaces the file in place.
Pair with eagle-palette-viewer to preview .ase files directly in Eagle.
| Path | Purpose |
|---|---|
convert-core.js |
Shared conversion logic (CLI + Eagle) |
lib/ase-writer.js |
Adobe .ase binary writer |
lib/css-to-swatches.js |
Flatten parsed CSS families into swatch rows |
parsers/ |
CSS palette parsing |
bin/convert-css-to-ase.js |
CLI entry point |
plugin.js |
Thin Eagle wrapper |
- Output uses RGB floats in standard ASE format, compatible with Affinity Designer and Adobe apps.
- All parsed colors are exported (every shade/token), not just one swatch per family.
- Keep
parsers/in sync witheagle-palette-viewerwhen CSS parsing changes.