Skip to content
SlashClone

Palette export

@slashclone/palette-export

Turn your design tokens into a downloadable color palette: a swatch sheet (SVG), JSON, CSS variables, and a GIMP palette that Krita and Inkscape also open. Handy for briefing designers or image models with your exact colors. Reads one colors file and writes only to an out folder.

SkillContentv0.1.0 (latest)Tested
Activity
New: be the first to try it
  1. 1{
  2. 2 "name": "palette-export",
  3. 3 "owner": "slashclone",
  4. 4 "version": "0.1.0",
  5. 5 "type": "skill",
  6. 6 "description": "Turn your design tokens into a downloadable color palette: a swatch sheet (SVG), JSON, CSS variables, and a GIMP palette that Krita and Inkscape also open. Handy for briefing designers or image models with your exact colors. Reads one colors file and writes only to an out folder.",
  7. 7 "category": "content",
  8. 8 "license": "MIT",
  9. 9 "compat": ["claude-code"],
  10. 10 "permissions": {
  11. 11 "shell": ["node scripts/export-palette.mjs"],
  12. 12 "files": { "read": ["./examples/**", "./data/**"], "write": ["./out/palette*"] }
  13. 13 },
  14. 14 "tests": {
  15. 15 "cases": [
  16. 16 {
  17. 17 "name": "exports every format from the example palette",
  18. 18 "inputs": {},
  19. 19 "checks": [
  20. 20 {
  21. 21 "type": "command_exits_zero",
  22. 22 "command": "node scripts/export-palette.mjs --in examples/colors.json --name Example --out out"
  23. 23 },
  24. 24 {
  25. 25 "type": "output_matches_schema",
  26. 26 "path": "out/palette.json",
  27. 27 "schema": {
  28. 28 "type": "object",
  29. 29 "required": ["name", "groups"],
  30. 30 "properties": {
  31. 31 "name": { "const": "Example" },
  32. 32 "groups": { "type": "array", "minItems": 3, "maxItems": 3 }
  33. 33 }
  34. 34 }
  35. 35 }
  36. 36 ]
  37. 37 },
  38. 38 {
  39. 39 "name": "accepts a flat name to hex map",
  40. 40 "inputs": { "data/flat.json": "{\"ink\":\"#16181D\",\"paper\":\"#FAF7F2\"}" },
  41. 41 "checks": [
  42. 42 {
  43. 43 "type": "command_exits_zero",
  44. 44 "command": "node scripts/export-palette.mjs --in data/flat.json --out out"
  45. 45 },
  46. 46 {
  47. 47 "type": "output_matches_schema",
  48. 48 "path": "out/palette.json",
  49. 49 "schema": {
  50. 50 "type": "object",
  51. 51 "properties": { "groups": { "type": "array", "minItems": 1, "maxItems": 1 } }
  52. 52 }
  53. 53 }
  54. 54 ]
  55. 55 }
  56. 56 ]
  57. 57 }