Skip to content

Commit d959227

Browse files
committed
feat:! introduce tints and shades palette
1 parent 7b9ec12 commit d959227

File tree

5 files changed

+74
-39
lines changed

5 files changed

+74
-39
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"@/": "./scripts/",
44
"@actions/core": "npm:@actions/[email protected]",
55
"@catppuccin/catppuccin/": "https://raw.githubusercontent.com/catppuccin/catppuccin/d4f82739e687cfd19d168be355367fdbbcc8e029/",
6-
"@catppuccin/palette": "npm:@catppuccin/palette@^1.7.1",
6+
"@catppuccin/palette/": "https://raw.githubusercontent.com/catppuccin/palette/feat%2Fgenerate-tints-and-shades/",
77
"@octokit/rest": "npm:@octokit/rest@^21.0.2",
88
"@std/assert": "jsr:@std/assert@^1.0.9",
99
"@std/cli": "jsr:@std/cli@^1.0.8",

deno.lock

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/lib.less

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* deno-fmt-ignore */
22
@catppuccin: {
3-
@latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; };
4-
@frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; };
5-
@macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; };
6-
@mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; };
3+
@latte: { @rosewater: { @t1: #de998c; @t2: #e0a69c; @t3: #e2b1ab; @t4: #e4bcb8; @t5: #e6c6c4; @s1: #d28372; @s2: #c27969; @s3: #af6d5e; @s4: #9a5f52; @s5: #804e43; @default: #dc8a78; }; @flamingo: { @t1: #df8b8c; @t2: #e19b9c; @t3: #e3a9ab; @t4: #e4b5b8; @t5: #e6c1c4; @s1: #d37272; @s2: #c26969; @s3: #b05e5e; @s4: #9a5252; @s5: #804343; @default: #dd7878; }; @pink: { @t1: #eb89d0; @t2: #eb9ad4; @t3: #eca8d9; @t4: #ecb5dd; @t5: #edc1e1; @s1: #df70c2; @s2: #ce67b2; @s3: #ba5da1; @s4: #a4518e; @s5: #884275; @default: #ea76cb; }; @mauve: { @t1: #9763f0; @t2: #a47ef0; @t3: #af93f1; @t4: #baa5f1; @t5: #c4b5f2; @s1: #8236e4; @s2: #7731d2; @s3: #6b2bbe; @s4: #5e25a7; @s5: #4d1d8b; @default: #8839ef; }; @red: { @t1: #d55664; @t2: #d87680; @t3: #db8d95; @t4: #dea1a8; @t5: #e1b1b8; @s1: #c80e36; @s2: #b90c31; @s3: #a7092b; @s4: #930725; @s5: #7a051d; @default: #d20f39; }; @maroon: { @t1: #e76972; @t2: #e88289; @t3: #e9969c; @t4: #eaa7ad; @t5: #ebb6bb; @s1: #dc414f; @s2: #ca3c48; @s3: #b73540; @s4: #a12e38; @s5: #86242d; @default: #e64553; }; @peach: { @t1: #fd7c57; @t2: #fb9077; @t3: #faa08f; @t4: #f8afa3; @t5: #f7bcb4; @s1: #f25f0a; @s2: #e05708; @s3: #cb4e07; @s4: #b24405; @s5: #943703; @default: #fe640b; }; @yellow: { @t1: #e19c5a; @t2: #e2a879; @t3: #e4b391; @t4: #e6bea4; @t5: #e7c8b5; @s1: #d5871b; @s2: #c47c18; @s3: #b27015; @s4: #9c6211; @s5: #82500c; @default: #df8e1d; }; @green: { @t1: #66aa5e; @t2: #7fb47c; @t3: #94bd93; @t4: #a5c6a6; @t5: #b4ceb6; @s1: #3d9929; @s2: #378c25; @s3: #317f20; @s4: #2a6f1b; @s5: #215b15; @default: #40a02b; }; @teal: { @t1: #569fa5; @t2: #75abb1; @t3: #8db6bb; @t4: #a0c0c5; @t5: #b0c9ce; @s1: #158b92; @s2: #138086; @s3: #107379; @s4: #0d656a; @s5: #085357; @default: #179299; }; @sky: { @t1: #53afe7; @t2: #74b8e8; @t3: #8bc0ea; @t4: #9fc8ec; @t5: #b0d0ed; @s1: #049ddb; @s2: #0391ca; @s3: #0283b6; @s4: #0272a0; @s5: #015e85; @default: #04a5e5; }; @sapphire: { @t1: #59aabd; @t2: #77b3c4; @t3: #8ebdcb; @t4: #a0c5d2; @t5: #b1cdd8; @s1: #1e98ad; @s2: #1b8b9f; @s3: #177e90; @s4: #136e7e; @s5: #0e5b68; @default: #209fb5; }; @blue: { @t1: #587ef5; @t2: #7791f5; @t3: #8da1f5; @t4: #a0b0f5; @t5: #b1bdf5; @s1: #1c61ea; @s2: #1959d8; @s3: #1650c3; @s4: #1245ac; @s5: #0d388f; @default: #1e66f5; }; @lavender: { @t1: #8696fc; @t2: #97a4fb; @t3: #a5b0fb; @t4: #b2bbfa; @t5: #bec5f9; @s1: #6d81f2; @s2: #6476df; @s3: #596aca; @s4: #4e5db1; @s5: #3f4c94; @default: #7287fd; }; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; };
4+
@frappe: { @rosewater: { @t1: #f3dad4; @t2: #f5deda; @t3: #f6e3df; @t4: #f7e7e4; @t5: #f9ebe9; @s1: #e7ccc6; @s2: #d6bdb9; @s3: #c3aca9; @s4: #ad9998; @s5: #928284; @default: #f2d5cf; }; @flamingo: { @t1: #f0c6c6; @t2: #f2cdcd; @t3: #f3d4d4; @t4: #f5dbdb; @t5: #f7e2e2; @s1: #e4b6b6; @s2: #d3a9aa; @s3: #c09a9c; @s4: #aa898d; @s5: #90757b; @default: #eebebe; }; @pink: { @t1: #f5c1e7; @t2: #f6c9ea; @t3: #f7d1ed; @t4: #f8d8ef; @t5: #fadff2; @s1: #e9b0da; @s2: #d8a3cb; @s3: #c495ba; @s4: #ae85a6; @s5: #93728f; @default: #f4b8e4; }; @mauve: { @t1: #d0abe9; @t2: #d6b7eb; @t3: #dcc2ee; @t4: #e1ccf0; @t5: #e7d6f3; @s1: #c197dc; @s2: #b38dcd; @s3: #a381bb; @s4: #9173a8; @s5: #7b6490; @default: #ca9ee6; }; @red: { @t1: #ea9597; @t2: #eca5a7; @t3: #efb4b5; @t4: #f1c1c2; @t5: #f3cdce; @s1: #dd7d7f; @s2: #cc7478; @s3: #ba6b70; @s4: #a56168; @s5: #8c555e; @default: #e78284; }; @maroon: { @t1: #eca7a9; @t2: #eeb4b6; @t3: #f1bfc1; @t4: #f3cacb; @t5: #f5d4d5; @s1: #e09396; @s2: #cf888d; @s3: #bc7d82; @s4: #a77077; @s5: #8d6169; @default: #ea999c; }; @peach: { @t1: #f1ac8c; @t2: #f2b89f; @t3: #f4c3af; @t4: #f6cdbd; @t5: #f7d6ca; @s1: #e59872; @s2: #d38e6c; @s3: #c08266; @s4: #ab745f; @s5: #906458; @default: #ef9f76; }; @yellow: { @t1: #e8cea0; @t2: #ebd5ae; @t3: #eddabb; @t4: #f0e0c6; @t5: #f2e6d1; @s1: #dbbf8b; @s2: #cbb182; @s3: #b8a279; @s4: #a4906f; @s5: #8a7b64; @default: #e5c890; }; @green: { @t1: #b2d69a; @t2: #bcdbaa; @t3: #c6e0b7; @t4: #d0e5c4; @t5: #d9e9cf; @s1: #9fc884; @s2: #93b97c; @s3: #87a974; @s4: #78966b; @s5: #678060; @default: #a6d189; }; @teal: { @t1: #94cec6; @t2: #a5d5cd; @t3: #b4dad4; @t4: #c1e0db; @t5: #cde6e2; @s1: #7cbfb6; @s2: #73b1aa; @s3: #6aa29c; @s4: #5f908d; @s5: #537b7b; @default: #81c8be; }; @sky: { @t1: #a7d6df; @t2: #b4dbe3; @t3: #bfe0e7; @t4: #cae5ea; @t5: #d4e9ee; @s1: #93c8d2; @s2: #88b9c3; @s3: #7ca9b3; @s4: #6f96a0; @s5: #60808a; @default: #99d1db; }; @sapphire: { @t1: #97c8e0; @t2: #a7cfe4; @t3: #b5d6e7; @t4: #c2ddeb; @t5: #cee3ee; @s1: #80b9d3; @s2: #77abc4; @s3: #6d9cb4; @s4: #628ba1; @s5: #55778b; @default: #85c1dc; }; @blue: { @t1: #9db5f0; @t2: #abbff2; @t3: #b9c9f3; @t4: #c5d2f5; @t5: #d0daf7; @s1: #86a3e4; @s2: #7d97d4; @s3: #728ac2; @s4: #677bad; @s5: #596a95; @default: #8caaee; }; @lavender: { @t1: #c2c3f2; @t2: #cacbf4; @t3: #d2d2f5; @t4: #d9daf7; @t5: #e0e0f8; @s1: #b2b3e7; @s2: #a5a6d6; @s3: #9698c4; @s4: #8687af; @s5: #727496; @default: #babbf1; }; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; };
5+
@macchiato: { @rosewater: { @t1: #f5dfdb; @t2: #f6e3df; @t3: #f7e7e3; @t4: #f8eae8; @t5: #faeeec; @s1: #e9d1cd; @s2: #d7c1be; @s3: #c4b0ad; @s4: #ad9b9b; @s5: #918384; @default: #f4dbd6; }; @flamingo: { @t1: #f2cdcd; @t2: #f3d3d3; @t3: #f5d9d9; @t4: #f6dfdf; @t5: #f8e5e5; @s1: #e5bdbe; @s2: #d4afb0; @s3: #c09fa1; @s4: #aa8d90; @s5: #8f777b; @default: #f0c6c6; }; @pink: { @t1: #f6c5e9; @t2: #f7cceb; @t3: #f8d4ee; @t4: #f9dbf0; @t5: #fae1f3; @s1: #eab5dc; @s2: #d8a7cc; @s3: #c498ba; @s4: #ae86a6; @s5: #92728d; @default: #f5bde6; }; @mauve: { @t1: #cdadf7; @t2: #d3b8f8; @t3: #d9c3f9; @t4: #dfcdfa; @t5: #e5d6fb; @s1: #bd99eb; @s2: #af8eda; @s3: #9f81c7; @s4: #8c72b1; @s5: #766196; @default: #c6a0f6; }; @red: { @t1: #ef99a5; @t2: #f1a8b2; @t3: #f3b6be; @t4: #f4c3c9; @t5: #f6cfd3; @s1: #e28190; @s2: #d17886; @s3: #be6d7c; @s4: #a86170; @s5: #8d5362; @default: #ed8796; }; @maroon: { @t1: #f0a7ad; @t2: #f2b4b8; @t3: #f3bfc3; @t4: #f5cacd; @t5: #f7d4d6; @s1: #e39299; @s2: #d2878f; @s3: #bf7b83; @s4: #a96e76; @s5: #8e5d67; @default: #ee99a0; }; @peach: { @t1: #f6b493; @t2: #f7bea4; @t3: #f8c8b3; @t4: #f9d1c0; @t5: #fadacc; @s1: #eaa27a; @s2: #d89572; @s3: #c4886a; @s4: #ae7961; @s5: #926656; @default: #f5a97f; }; @yellow: { @t1: #f0d9ac; @t2: #f2ddb8; @t3: #f3e2c3; @t4: #f5e6cd; @t5: #f7ebd6; @s1: #e3cb99; @s2: #d2bb8e; @s3: #bfaa82; @s4: #a99775; @s5: #8e7f66; @default: #eed49f; }; @green: { @t1: #b2dea4; @t2: #bce2b1; @t3: #c6e6bd; @t4: #d0eac8; @t5: #d9edd3; @s1: #9fd08f; @s2: #93c185; @s3: #85af7b; @s4: #769b6f; @s5: #648261; @default: #a6da95; }; @teal: { @t1: #9cdad0; @t2: #abded6; @t3: #b8e3dc; @t4: #c4e7e1; @t5: #d0ebe7; @s1: #85ccc1; @s2: #7bbcb3; @s3: #70aba4; @s4: #639792; @s5: #557f7d; @default: #8bd5ca; }; @sky: { @t1: #a1dbe6; @t2: #afe0e9; @t3: #bbe4ec; @t4: #c7e8ef; @t5: #d2ecf2; @s1: #8bcdd9; @s2: #80bec9; @s3: #75adb8; @s4: #6899a4; @s5: #58818b; @default: #91d7e3; }; @sapphire: { @t1: #91cbe7; @t2: #a3d2ea; @t3: #b2d8ed; @t4: #bfdeef; @t5: #cce4f2; @s1: #78bbda; @s2: #6fadca; @s3: #659db9; @s4: #5a8ba4; @s5: #4d768c; @default: #7dc4e4; }; @blue: { @t1: #9bb7f5; @t2: #aac1f6; @t3: #b8caf7; @t4: #c4d3f8; @t5: #cfdbfa; @s1: #84a5e9; @s2: #7a99d8; @s3: #6f8bc5; @s4: #637baf; @s5: #546895; @default: #8aadf4; }; @lavender: { @t1: #c0c5f9; @t2: #c8ccf9; @t3: #d0d4fa; @t4: #d8dbfb; @t5: #dfe1fc; @s1: #afb5ed; @s2: #a2a7dc; @s3: #9398c8; @s4: #8286b2; @s5: #6d7297; @default: #b7bdf8; }; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; };
6+
@mocha: { @rosewater: { @t1: #f6e3e0; @t2: #f7e7e4; @t3: #f8eae7; @t4: #f9edeb; @t5: #faf0ee; @s1: #ead6d2; @s2: #d8c6c3; @s3: #c4b3b1; @s4: #ad9e9d; @s5: #918585; @default: #f5e0dc; }; @flamingo: { @t1: #f3d3d3; @t2: #f5d8d8; @t3: #f6dede; @t4: #f7e3e3; @t5: #f9e8e8; @s1: #e7c4c4; @s2: #d6b5b5; @s3: #c2a4a5; @s4: #ab9193; @s5: #8f797c; @default: #f2cdcd; }; @pink: { @t1: #f6c9ea; @t2: #f7d0ec; @t3: #f8d7ef; @t4: #f9ddf1; @t5: #fae3f3; @s1: #eab9dd; @s2: #d8abcc; @s3: #c49bba; @s4: #ad89a5; @s5: #91738b; @default: #f5c2e7; }; @mauve: { @t1: #d1b2f8; @t2: #d7bcf9; @t3: #dcc6f9; @t4: #e2d0fa; @t5: #e7d9fb; @s1: #c29fec; @s2: #b392da; @s3: #a285c7; @s4: #8f75b0; @s5: #786394; @default: #cba6f7; }; @red: { @t1: #f49cb3; @t2: #f5abbe; @t3: #f7b8c7; @t4: #f8c4d1; @t5: #f9d0d9; @s1: #e885a1; @s2: #d67b95; @s3: #c36f88; @s4: #ac6279; @s5: #905367; @default: #f38ba8; }; @maroon: { @t1: #edadb7; @t2: #efb8c0; @t3: #f1c3ca; @t4: #f3cdd2; @t5: #f5d6db; @s1: #e099a5; @s2: #cf8d98; @s3: #bc808b; @s4: #a6717c; @s5: #8b5f6a; @default: #eba0ac; }; @peach: { @t1: #fbbc99; @t2: #fbc5a8; @t3: #fcceb6; @t4: #fcd6c3; @t5: #fdddcf; @s1: #efab81; @s2: #dd9e78; @s3: #c88f6e; @s4: #b17e63; @s5: #946a55; @default: #fab387; }; @yellow: { @t1: #fae5b9; @t2: #fae8c3; @t3: #fbebcb; @t4: #fbeed4; @t5: #fcf1dc; @s1: #eed8a7; @s2: #dcc79b; @s3: #c7b58d; @s4: #b0a07e; @s5: #93866b; @default: #f9e2af; }; @green: { @t1: #b2e6ae; @t2: #bce9b9; @t3: #c6ecc4; @t4: #d0efcd; @t5: #d9f2d7; @s1: #9fd99a; @s2: #92c88f; @s3: #85b682; @s4: #75a074; @s5: #638663; @default: #a6e3a1; }; @teal: { @t1: #a3e5da; @t2: #b1e8de; @t3: #bdebe3; @t4: #c8eee7; @t5: #d3f1eb; @s1: #8dd8cc; @s2: #83c7bc; @s3: #77b5ac; @s4: #69a098; @s5: #588681; @default: #94e2d5; }; @sky: { @t1: #9ae0ed; @t2: #aae4ef; @t3: #b7e7f1; @t4: #c4ebf3; @t5: #cfeef5; @s1: #83d2e1; @s2: #79c2d0; @s3: #6eb0bd; @s4: #619ba7; @s5: #52828d; @default: #89dceb; }; @sapphire: { @t1: #8bceee; @t2: #9ed4f0; @t3: #aedaf2; @t4: #bce0f4; @t5: #c9e5f6; @s1: #6fbee2; @s2: #66b0d1; @s3: #5d9fbe; @s4: #538ca8; @s5: #46768e; @default: #74c7ec; }; @blue: { @t1: #9abdfb; @t2: #aac6fb; @t3: #b7cefc; @t4: #c4d6fc; @t5: #cfdefd; @s1: #83acef; @s2: #799fdd; @s3: #6e90c9; @s4: #617fb2; @s5: #526b96; @default: #89b4fa; }; @lavender: { @t1: #bdc6fe; @t2: #c6cdfe; @t3: #ced4fe; @t4: #d6dbfe; @t5: #dee2ff; @s1: #acb5f3; @s2: #9fa8e1; @s3: #9098cc; @s4: #7f86b5; @s5: #6b7099; @default: #b4befe; }; @text: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; };
77
};
88

99
/* deno-fmt-ignore */
@@ -77,13 +77,13 @@
7777
color-scheme: if(@flavor = latte, light, dark);
7878

7979
::selection {
80-
background-color: fade(@accent, 30%);
80+
background-color: fade(@accent[], 30%);
8181
}
8282

8383
input,
8484
textarea {
8585
&::placeholder {
86-
color: @subtext0 !important;
86+
color: @subtext0[] !important;
8787
}
8888
}
8989
}
@@ -99,31 +99,31 @@
9999
}
100100

101101
.css-variables() {
102-
--ctp-rosewater: @rosewater;
103-
--ctp-flamingo: @flamingo;
104-
--ctp-pink: @pink;
105-
--ctp-mauve: @mauve;
106-
--ctp-red: @red;
107-
--ctp-maroon: @maroon;
108-
--ctp-peach: @peach;
109-
--ctp-yellow: @yellow;
110-
--ctp-green: @green;
111-
--ctp-teal: @teal;
112-
--ctp-sky: @sky;
113-
--ctp-sapphire: @sapphire;
114-
--ctp-blue: @blue;
115-
--ctp-lavender: @lavender;
116-
--ctp-text: @text;
117-
--ctp-subtext1: @subtext1;
118-
--ctp-subtext0: @subtext0;
119-
--ctp-overlay2: @overlay2;
120-
--ctp-overlay1: @overlay1;
121-
--ctp-overlay0: @overlay0;
122-
--ctp-surface2: @surface2;
123-
--ctp-surface1: @surface1;
124-
--ctp-surface0: @surface0;
125-
--ctp-base: @base;
126-
--ctp-mantle: @mantle;
127-
--ctp-crust: @crust;
102+
--ctp-rosewater: @rosewater[];
103+
--ctp-flamingo: @flamingo[];
104+
--ctp-pink: @pink[];
105+
--ctp-mauve: @mauve[];
106+
--ctp-red: @red[];
107+
--ctp-maroon: @maroon[];
108+
--ctp-peach: @peach[];
109+
--ctp-yellow: @yellow[];
110+
--ctp-green: @green[];
111+
--ctp-teal: @teal[];
112+
--ctp-sky: @sky[];
113+
--ctp-sapphire: @sapphire[];
114+
--ctp-blue: @blue[];
115+
--ctp-lavender: @lavender[];
116+
--ctp-text: @text[];
117+
--ctp-subtext1: @subtext1[];
118+
--ctp-subtext0: @subtext0[];
119+
--ctp-overlay2: @overlay2[];
120+
--ctp-overlay1: @overlay1[];
121+
--ctp-overlay0: @overlay0[];
122+
--ctp-surface2: @surface2[];
123+
--ctp-surface1: @surface1[];
124+
--ctp-surface0: @surface0[];
125+
--ctp-base: @base[];
126+
--ctp-mantle: @mantle[];
127+
--ctp-crust: @crust[];
128128
}
129129
}

scripts/palette.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {
2+
type AccentName,
3+
flavorEntries,
4+
flavors,
5+
} from "@catppuccin/palette/mod.ts";
6+
7+
const longestFlavorIdentifierLength = Math.max(
8+
...Object.keys(flavors).map((key) => key.length),
9+
);
10+
11+
const PALETTE_BLOCK = `@catppuccin: {
12+
${
13+
flavorEntries.map(([fid, flavor]) => {
14+
const padding = " ".repeat(longestFlavorIdentifierLength - fid.length);
15+
16+
function formatTintsAndShades(cid: AccentName) {
17+
const tints = Object.values(flavor.tints[cid])
18+
.map((t) => `@t${t.order + 1}: ${t.hex};`);
19+
const shades = Object.values(flavor.shades[cid])
20+
.map((s) => `@s${s.order + 1}: ${s.hex};`);
21+
return `{ ${
22+
[...tints, ...shades, `@default: ${flavor.colors[cid].hex};`].join(" ")
23+
} }`;
24+
}
25+
26+
const colors = flavor.colorEntries.map(([cid, color]) => {
27+
const value = color.accent
28+
? formatTintsAndShades(cid as AccentName)
29+
: color.hex;
30+
return `@${cid}: ${value};`;
31+
}).join(" ");
32+
33+
return ` @${fid}: ${padding}{ ${colors} };`;
34+
}).join("\n")
35+
}
36+
};`;
37+
38+
console.log(PALETTE_BLOCK);

template/catppuccin.user.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@preprocessor less
1313
@var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"]
1414
@var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"]
15-
@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"]
15+
@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender"]
1616
==/UserStyle== */
1717

1818
@import "https://userstyles.catppuccin.com/lib/lib.less";

0 commit comments

Comments
 (0)