Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joanroig committed Apr 30, 2023
2 parents c12af74 + 52710c1 commit 1777542
Show file tree
Hide file tree
Showing 10 changed files with 1,736 additions and 2,569 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ Be sure to have [Node.js](https://nodejs.org/en/download/) installed, then:
- Run `npm run convert` to convert the palettes.
- The converted files should be in the `palette-export` folder.

### Extras
## Configuration

Run `npm run convert-bw` to add black and white colors to the exported palettes.
The input, output, color naming and addition of black & white colors can be changed in: [config.json](config.json)

### Configuration parameters

- **inFolder:** folder used to read the swatches.
- **outFolder:** folder used to output the resulting ase files.
- **colorNameFormat:** sets the collection of color names to be used. Available namings are: _roygbiv, basic, html, x11, pantone, ntc_. See [color namer](https://github.com/colorjs/color-namer) for reference.
- **addBlackWhite:** if true, two extra colors will be added:

<p align="center">
<img src="examples/ps-bw.png" alt="converted palette" width="300px"/>
Expand All @@ -48,6 +55,7 @@ https://bardotbrush.com/procreate-color-palettes/

### Libraries used

https://github.com/szydlovski/procreate-swatches
https://www.npmjs.com/package/color-convert
https://github.com/DominikGuzei/node-ase-utils
- https://github.com/szydlovski/procreate-swatches
- https://www.npmjs.com/package/color-convert
- https://github.com/DominikGuzei/node-ase-utils
- https://github.com/colorjs/color-namer
6 changes: 6 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"inFolder": "palette-in/",
"outFolder": "palette-out/",
"colorNameFormat": "pantone",
"addBlackWhite": true
}
2 changes: 1 addition & 1 deletion nodemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"watch": ["src"],
"ext": ".ts,.js",
"ignore": [],
"exec": "ts-node ./src/index.ts"
"exec": "npx tsx ./src/index.ts"
}
Loading

0 comments on commit 1777542

Please sign in to comment.