88e2795c5d
* feat: add support for apple color list / .clr files * style: format with swift-format * refactor: minor changes * refactor: simplify `hexToRGBA` * fix: use `red` not `calibratedRed` parameter for NSColor * refactor: clean up arg handling * ci(release-please): use macos runner, setup swift * fix: import Buffer type * fix: require `COMPILE_APPLE_COLOR_LIST=1` * ci(test): switch to macos & build everything * ci: upload palettes as artifact * Update .github/workflows/test.yml Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com> --------- Co-authored-by: sgoudham <sgoudham@gmail.com> Co-authored-by: Hammy <58985301+sgoudham@users.noreply.github.com> |
||
---|---|---|
.github/workflows | ||
.vscode | ||
docs | ||
scripts | ||
types | ||
.editorconfig | ||
.gitignore | ||
.release-please-manifest.json | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
deno.json | ||
deno.lock | ||
import_map.json | ||
mod.test.ts | ||
mod.ts | ||
palette.json | ||
release-please-config.json | ||
shell.nix |
README.md
Catppuccin Palettes
Usage
Node
The library is available on npm:
npm install @catppuccin/palette
import { flavors, flavorEntries } from "@catppuccin/palette";
import chalk from "chalk";
// an object containing all catppuccin flavors
console.log(flavors);
// typed helper when iterating flavors
flavorEntries.map(([_, flavor]) => {
console.log(`${flavor.name} is a ${flavor.dark ? "dark" : "light"} theme.`);
console.log(`It has ${flavor.colorEntries.length} colors:`);
// same for the colors
flavor.colorEntries.map(([colorName, { hex, rgb, accent }]) => {
console.log(
chalk.bgRgb(rgb.r, rgb.b, rgb.g)(` ${hex} `),
colorName,
accent
);
});
console.log("\n");
});
Deno
The library is available through JSR and deno.land/x/catppuccin
:
import { flavors, flavorEntries } from "https://deno.land/x/catppuccin/mod.ts";
import { bgRgb24 } from "https://deno.land/std/fmt/colors.ts";
// an object containing all catppuccin flavors
console.log(flavors);
// typed helper when iterating flavors
flavorEntries.map(([_, flavor]) => {
console.log(`${flavor.name} is a ${flavor.dark ? "dark" : "light"} theme.`);
console.log(`It has ${flavor.colorEntries.length} colors:`);
// same for the colors
flavor.colorEntries.map(([colorName, { hex, rgb, accent }]) => {
console.log(bgRgb24(` ${hex} `, { ...rgb }), colorName, accent);
});
console.log("\n");
});
Other available formats
- Web development
- Ports of this library
Graphics editors
Please use the respective files in the latest GitHub Release:
Programs | Directory |
---|---|
Adobe Suite, Affinity Suite, Sip | ase/ |
Aseprite, Gimp, Inkscape, Krita | gimp/ |
Procreate | procreate/ |
Apple Color List (.clr) | clr/ |
Copyright © 2021-present Catppuccin Org