Skip to content

Commit

Permalink
fix(settings): customUIColors color key names (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston authored Dec 12, 2023
1 parent bdbc56a commit 43a6cdc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions schemas/customUIColors.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@
"sapphire",
"blue",
"lavender",
"text",
"subtext1",
"subtext0",
"overlay2",
"overlay1",
"overlay0",
"surface2",
"surface1",
"surface0",
"base",
"mantle",
"crust",
"accent"
]
},
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/updateSchemas.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { writeFile } from "node:fs/promises";
import { join } from "node:path";
import { labels } from "@catppuccin/palette";

import { repoRoot, vscodeSchemasRoot } from "./constants";
import { accents } from "./updatePackageJson";
Expand All @@ -22,7 +23,7 @@ const customUiColorsSchema = (workbenchColors: any) => {
catppuccinColor: {
anyOf: [
// allow plain color names,
{ enum: validColors },
{ enum: [...Object.keys(labels), "accent"] },
// custom hex codes,
{ format: "color-hex" },
// and plain color names + opacity
Expand Down

0 comments on commit 43a6cdc

Please sign in to comment.