Skip to content

Commit

Permalink
feat: add color names and spec order (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston authored Feb 12, 2024
1 parent 823bd01 commit caefe28
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mod.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assertEquals } from "std/assert/assert_equals.ts";

import { flavorEntries, flavors } from "@catppuccin/palette";
import palette from "@/palette.json" assert { type: "json" };
import palette from "@/palette.json" with { type: "json" };

Deno.test("flavorEntries", () => {
flavorEntries
Expand Down
15 changes: 15 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ export type CatppuccinFlavor = Readonly<{
*/
name: string;

/**
* Order of the flavor in the palette spec
*/
order: number;

/**
* Whether the flavor is a dark theme
*/
Expand Down Expand Up @@ -117,6 +122,16 @@ export type Flavors<T> = {
};

export type ColorFormat = Readonly<{
/**
* Name of the color
*/
name: string;

/**
* Order of the color in the palette spec
*/
order: number;

/**
* String-formatted hex value
* @example "#babbf1"
Expand Down
Loading

0 comments on commit caefe28

Please sign in to comment.