Merge branch 'catppuccin:main' into main

This commit is contained in:
Rooot 2023-01-05 17:13:16 +01:00 committed by GitHub
commit 6f10fac0ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 0 deletions

View file

@ -23,6 +23,8 @@
- [Sass](#sass)
- [Tailwind CSS](https://github.com/catppuccin/tailwindcss) (separate repository)
- [Rust](https://github.com/catppuccin/rust) (separate repository)
- [Python](https://github.com/catppuccin/python) (separate repository)
- [Go](https://github.com/catppuccin/go) (separate repository)
- Design
- [Affinity](#affinity)
- [Aseprite / LibreSprite](#aseprite)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

29
procreate/build.ts Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env deno run --allow-read --allow-write --allow-env
import { createSwatchesFile } from "npm:procreate-swatches";
const capitalize = (str: string) => str[0].toUpperCase() + str.slice(1);
type Color = {
hex: string;
rgb: string;
hsl: string;
};
type Palette = Record<string, Color>;
const library: Palette[] = JSON.parse(
await Deno.readTextFile("../palette.json"),
);
for (const palette in library) {
const colours: Palette = library[palette];
const rgbValues = Object.values(colours).map((colour) => [
colour.rgb.match(/\d+/g),
"rgb",
]);
const name = `Catppuccin ${capitalize(palette)}`;
const data: ArrayBuffer = await createSwatchesFile(name, rgbValues);
Deno.writeFileSync(`./${name}.swatches`, new Uint8Array(data));
}