From 1392312ef6fe5547b730b0dcc34b6b23ccf4ab38 Mon Sep 17 00:00:00 2001 From: winston Date: Sun, 30 Apr 2023 22:08:02 +0200 Subject: [PATCH] refactor: exclude generated palettes from VCS, add GIMP to autogen --- .gitignore | 5 +- esbuild.js | 15 - gpl/Catppuccin Frappe.gpl | 29 - gpl/Catppuccin Latte.gpl | 29 - gpl/Catppuccin Macchiato.gpl | 29 - gpl/Catppuccin Mocha.gpl | 29 - package.json | 3 +- palette-porcelain.json | 1362 ------------------------------ png/catppuccin-frappe.png | Bin 1897 -> 0 bytes png/catppuccin-latte.png | Bin 1897 -> 0 bytes png/catppuccin-macchiato.png | Bin 1891 -> 0 bytes png/catppuccin-mocha.png | Bin 1884 -> 0 bytes sip/Catppuccin Frappe.palette | 253 ------ sip/Catppuccin Latte.palette | 253 ------ sip/Catppuccin Macchiato.palette | 253 ------ sip/Catppuccin Mocha.palette | 253 ------ sip/build.ts | 59 -- src/index.d.ts | 143 ---- src/index.js | 905 -------------------- src/index.ts | 726 ++++++++++++++++ src/scripts/build_palettes.mjs | 79 ++ src/scripts/build_sip.mjs | 52 -- test.js | 35 - tsup.config.ts | 9 + 24 files changed, 818 insertions(+), 3703 deletions(-) delete mode 100644 esbuild.js delete mode 100644 gpl/Catppuccin Frappe.gpl delete mode 100644 gpl/Catppuccin Latte.gpl delete mode 100644 gpl/Catppuccin Macchiato.gpl delete mode 100644 gpl/Catppuccin Mocha.gpl delete mode 100644 png/catppuccin-frappe.png delete mode 100644 png/catppuccin-latte.png delete mode 100644 png/catppuccin-macchiato.png delete mode 100644 png/catppuccin-mocha.png delete mode 100644 sip/Catppuccin Frappe.palette delete mode 100644 sip/Catppuccin Latte.palette delete mode 100644 sip/Catppuccin Macchiato.palette delete mode 100644 sip/Catppuccin Mocha.palette delete mode 100755 sip/build.ts delete mode 100644 src/index.d.ts delete mode 100644 src/index.js create mode 100644 src/index.ts create mode 100644 src/scripts/build_palettes.mjs delete mode 100644 src/scripts/build_sip.mjs delete mode 100644 test.js create mode 100644 tsup.config.ts diff --git a/.gitignore b/.gitignore index 1139723..854c10a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -dist/ -node_modules/ +/dist/ +/node_modules/ +/palettes/ /*.tgz diff --git a/esbuild.js b/esbuild.js deleted file mode 100644 index 7d14d1e..0000000 --- a/esbuild.js +++ /dev/null @@ -1,15 +0,0 @@ -const esbuild = require('esbuild'); - -const buildCJS = esbuild.build({ - entryPoints: ['./index.js'], - outfile: './dist/index.cjs', - format: 'cjs' -}) - -const buildESM = esbuild.build({ - entryPoints: ['./index.js'], - outfile: './dist/index.mjs', - format: 'esm' -}) - -Promise.all([buildCJS, buildESM]).catch(() => process.exit(1)) diff --git a/gpl/Catppuccin Frappe.gpl b/gpl/Catppuccin Frappe.gpl deleted file mode 100644 index f37a32c..0000000 --- a/gpl/Catppuccin Frappe.gpl +++ /dev/null @@ -1,29 +0,0 @@ -GIMP Palette -#Palette Name: Catppuccin Frappe -#Colors: 26 -242 213 207 f2d5cf -238 190 190 eebebe -244 184 228 f4b8e4 -202 158 230 ca9ee6 -231 130 132 e78284 -234 153 156 ea999c -239 159 118 ef9f76 -229 200 144 e5c890 -166 209 137 a6d189 -129 200 190 81c8be -153 209 219 99d1db -133 193 220 85c1dc -140 170 238 8caaee -186 187 241 babbf1 -198 208 245 c6d0f5 -181 191 226 b5bfe2 -165 173 206 a5adce -148 156 187 949cbb -131 139 167 838ba7 -115 121 148 737994 -98 104 128 626880 -81 87 109 51576d -65 69 89 414559 -48 52 70 303446 -41 44 60 292c3c -35 38 52 232634 \ No newline at end of file diff --git a/gpl/Catppuccin Latte.gpl b/gpl/Catppuccin Latte.gpl deleted file mode 100644 index d1305ba..0000000 --- a/gpl/Catppuccin Latte.gpl +++ /dev/null @@ -1,29 +0,0 @@ -GIMP Palette -#Palette Name: Catppuccin Latte -#Colors: 26 -220 138 120 dc8a78 -221 120 120 dd7878 -234 118 203 ea76cb -136 57 239 8839ef -210 15 57 d20f39 -230 69 83 e64553 -254 100 11 fe640b -223 142 29 df8e1d -64 160 43 40a02b -23 146 153 179299 -4 165 229 04a5e5 -32 159 181 209fb5 -30 102 245 1e66f5 -114 135 253 7287fd -76 79 105 4c4f69 -92 95 119 5c5f77 -108 111 133 6c6f85 -124 127 147 7c7f93 -140 143 161 8c8fa1 -156 160 176 9ca0b0 -172 176 190 acb0be -188 192 204 bcc0cc -204 208 218 ccd0da -220 224 232 dce0e8 -230 233 239 e6e9ef -239 241 245 eff1f5 \ No newline at end of file diff --git a/gpl/Catppuccin Macchiato.gpl b/gpl/Catppuccin Macchiato.gpl deleted file mode 100644 index cd9eee1..0000000 --- a/gpl/Catppuccin Macchiato.gpl +++ /dev/null @@ -1,29 +0,0 @@ -GIMP Palette -#Palette Name: Catppuccin Macchiato -#Colors: 26 -244 219 214 f4dbd6 -240 198 198 f0c6c6 -245 189 230 f5bde6 -198 160 246 c6a0f6 -237 135 150 ed8796 -238 153 160 ee99a0 -245 169 127 f5a97f -238 212 159 eed49f -166 218 149 a6da95 -139 213 202 8bd5ca -145 215 227 91d7e3 -125 196 228 7dc4e4 -138 173 244 8aadf4 -183 189 248 b7bdf8 -202 211 245 cad3f5 -184 192 224 b8c0e0 -165 173 203 a5adcb -147 154 183 939ab7 -128 135 162 8087a2 -110 115 141 6e738d -91 96 120 5b6078 -73 77 100 494d64 -54 58 79 363a4f -36 39 58 24273a -30 32 48 1e2030 -24 25 38 181926 \ No newline at end of file diff --git a/gpl/Catppuccin Mocha.gpl b/gpl/Catppuccin Mocha.gpl deleted file mode 100644 index e63f0e0..0000000 --- a/gpl/Catppuccin Mocha.gpl +++ /dev/null @@ -1,29 +0,0 @@ -GIMP Palette -#Palette Name: Catppuccin Mocha -#Colors: 26 -245 224 220 f5e0dc -242 205 205 f2cdcd -245 194 231 f5c2e7 -203 166 247 cba6f7 -243 139 168 f38ba8 -235 160 172 eba0ac -250 179 135 fab387 -249 226 175 f9e2af -166 227 161 a6e3a1 -148 226 213 94e2d5 -137 220 235 89dceb -116 199 236 74c7ec -137 180 250 89b4fa -180 190 254 b4befe -205 214 244 cdd6f4 -186 194 222 bac2de -166 173 200 a6adc8 -147 153 178 9399b2 -127 132 156 7f849c -108 112 134 6c7086 -88 91 112 585b70 -69 71 90 45475a -49 50 68 313244 -30 30 46 1e1e2e -24 24 37 181825 -17 17 27 11111b \ No newline at end of file diff --git a/package.json b/package.json index f1b55ff..fadd137 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "./less/*": "./less/*" }, "scripts": { - "test": "ava", - "build:npm": "node esbuild.js", + "build:npm": "tsup", "build:json": "jq -f porcelain.jq palette.json > palette-porcelain.json", "build": "npm run build:npm && npm run build:json", "prepublishOnly": "npm run build", diff --git a/palette-porcelain.json b/palette-porcelain.json index 5ed5a38..e69de29 100644 --- a/palette-porcelain.json +++ b/palette-porcelain.json @@ -1,1362 +0,0 @@ -{ - "latte": { - "rosewater": { - "hex": "dc8a78", - "rgb": [ - 220, - 138, - 120 - ], - "hsl": [ - 11, - 0.59, - 0.67 - ] - }, - "flamingo": { - "hex": "dd7878", - "rgb": [ - 221, - 120, - 120 - ], - "hsl": [ - 0, - 0.6, - 0.67 - ] - }, - "pink": { - "hex": "ea76cb", - "rgb": [ - 234, - 118, - 203 - ], - "hsl": [ - 316, - 0.73, - 0.69 - ] - }, - "mauve": { - "hex": "8839ef", - "rgb": [ - 136, - 57, - 239 - ], - "hsl": [ - 266, - 0.85, - 0.58 - ] - }, - "red": { - "hex": "d20f39", - "rgb": [ - 210, - 15, - 57 - ], - "hsl": [ - 347, - 0.87, - 0.44 - ] - }, - "maroon": { - "hex": "e64553", - "rgb": [ - 230, - 69, - 83 - ], - "hsl": [ - 355, - 0.76, - 0.59 - ] - }, - "peach": { - "hex": "fe640b", - "rgb": [ - 254, - 100, - 11 - ], - "hsl": [ - 22, - 0.99, - 0.52 - ] - }, - "yellow": { - "hex": "df8e1d", - "rgb": [ - 223, - 142, - 29 - ], - "hsl": [ - 35, - 0.77, - 0.49 - ] - }, - "green": { - "hex": "40a02b", - "rgb": [ - 64, - 160, - 43 - ], - "hsl": [ - 109, - 0.58, - 0.4 - ] - }, - "teal": { - "hex": "179299", - "rgb": [ - 23, - 146, - 153 - ], - "hsl": [ - 183, - 0.74, - 0.35 - ] - }, - "sky": { - "hex": "04a5e5", - "rgb": [ - 4, - 165, - 229 - ], - "hsl": [ - 197, - 0.97, - 0.46 - ] - }, - "sapphire": { - "hex": "209fb5", - "rgb": [ - 32, - 159, - 181 - ], - "hsl": [ - 189, - 0.7, - 0.42 - ] - }, - "blue": { - "hex": "1e66f5", - "rgb": [ - 30, - 102, - 245 - ], - "hsl": [ - 220, - 0.91, - 0.54 - ] - }, - "lavender": { - "hex": "7287fd", - "rgb": [ - 114, - 135, - 253 - ], - "hsl": [ - 231, - 0.97, - 0.72 - ] - }, - "text": { - "hex": "4c4f69", - "rgb": [ - 76, - 79, - 105 - ], - "hsl": [ - 234, - 0.16, - 0.35 - ] - }, - "subtext1": { - "hex": "5c5f77", - "rgb": [ - 92, - 95, - 119 - ], - "hsl": [ - 233, - 0.13, - 0.41 - ] - }, - "subtext0": { - "hex": "6c6f85", - "rgb": [ - 108, - 111, - 133 - ], - "hsl": [ - 233, - 0.1, - 0.47 - ] - }, - "overlay2": { - "hex": "7c7f93", - "rgb": [ - 124, - 127, - 147 - ], - "hsl": [ - 232, - 0.1, - 0.53 - ] - }, - "overlay1": { - "hex": "8c8fa1", - "rgb": [ - 140, - 143, - 161 - ], - "hsl": [ - 231, - 0.1, - 0.59 - ] - }, - "overlay0": { - "hex": "9ca0b0", - "rgb": [ - 156, - 160, - 176 - ], - "hsl": [ - 228, - 0.11, - 0.65 - ] - }, - "surface2": { - "hex": "acb0be", - "rgb": [ - 172, - 176, - 190 - ], - "hsl": [ - 227, - 0.12, - 0.71 - ] - }, - "surface1": { - "hex": "bcc0cc", - "rgb": [ - 188, - 192, - 204 - ], - "hsl": [ - 225, - 0.14, - 0.77 - ] - }, - "surface0": { - "hex": "ccd0da", - "rgb": [ - 204, - 208, - 218 - ], - "hsl": [ - 223, - 0.16, - 0.83 - ] - }, - "base": { - "hex": "eff1f5", - "rgb": [ - 239, - 241, - 245 - ], - "hsl": [ - 220, - 0.23, - 0.95 - ] - }, - "mantle": { - "hex": "e6e9ef", - "rgb": [ - 230, - 233, - 239 - ], - "hsl": [ - 220, - 0.22, - 0.92 - ] - }, - "crust": { - "hex": "dce0e8", - "rgb": [ - 220, - 224, - 232 - ], - "hsl": [ - 220, - 0.21, - 0.89 - ] - } - }, - "frappe": { - "rosewater": { - "hex": "f2d5cf", - "rgb": [ - 242, - 213, - 207 - ], - "hsl": [ - 10, - 0.57, - 0.88 - ] - }, - "flamingo": { - "hex": "eebebe", - "rgb": [ - 238, - 190, - 190 - ], - "hsl": [ - 0, - 0.59, - 0.84 - ] - }, - "pink": { - "hex": "f4b8e4", - "rgb": [ - 244, - 184, - 228 - ], - "hsl": [ - 316, - 0.73, - 0.84 - ] - }, - "mauve": { - "hex": "ca9ee6", - "rgb": [ - 202, - 158, - 230 - ], - "hsl": [ - 277, - 0.59, - 0.76 - ] - }, - "red": { - "hex": "e78284", - "rgb": [ - 231, - 130, - 132 - ], - "hsl": [ - 359, - 0.68, - 0.71 - ] - }, - "maroon": { - "hex": "ea999c", - "rgb": [ - 234, - 153, - 156 - ], - "hsl": [ - 358, - 0.66, - 0.76 - ] - }, - "peach": { - "hex": "ef9f76", - "rgb": [ - 239, - 159, - 118 - ], - "hsl": [ - 20, - 0.79, - 0.7 - ] - }, - "yellow": { - "hex": "e5c890", - "rgb": [ - 229, - 200, - 144 - ], - "hsl": [ - 40, - 0.62, - 0.73 - ] - }, - "green": { - "hex": "a6d189", - "rgb": [ - 166, - 209, - 137 - ], - "hsl": [ - 96, - 0.44, - 0.68 - ] - }, - "teal": { - "hex": "81c8be", - "rgb": [ - 129, - 200, - 190 - ], - "hsl": [ - 172, - 0.39, - 0.65 - ] - }, - "sky": { - "hex": "99d1db", - "rgb": [ - 153, - 209, - 219 - ], - "hsl": [ - 189, - 0.48, - 0.73 - ] - }, - "sapphire": { - "hex": "85c1dc", - "rgb": [ - 133, - 193, - 220 - ], - "hsl": [ - 199, - 0.55, - 0.69 - ] - }, - "blue": { - "hex": "8caaee", - "rgb": [ - 140, - 170, - 238 - ], - "hsl": [ - 222, - 0.74, - 0.74 - ] - }, - "lavender": { - "hex": "babbf1", - "rgb": [ - 186, - 187, - 241 - ], - "hsl": [ - 239, - 0.66, - 0.84 - ] - }, - "text": { - "hex": "c6d0f5", - "rgb": [ - 198, - 208, - 245 - ], - "hsl": [ - 227, - 0.7, - 0.87 - ] - }, - "subtext1": { - "hex": "b5bfe2", - "rgb": [ - 181, - 191, - 226 - ], - "hsl": [ - 227, - 0.44, - 0.8 - ] - }, - "subtext0": { - "hex": "a5adce", - "rgb": [ - 165, - 173, - 206 - ], - "hsl": [ - 228, - 0.29, - 0.73 - ] - }, - "overlay2": { - "hex": "949cbb", - "rgb": [ - 148, - 156, - 187 - ], - "hsl": [ - 228, - 0.22, - 0.66 - ] - }, - "overlay1": { - "hex": "838ba7", - "rgb": [ - 131, - 139, - 167 - ], - "hsl": [ - 227, - 0.17, - 0.58 - ] - }, - "overlay0": { - "hex": "737994", - "rgb": [ - 115, - 121, - 148 - ], - "hsl": [ - 229, - 0.13, - 0.52 - ] - }, - "surface2": { - "hex": "626880", - "rgb": [ - 98, - 104, - 128 - ], - "hsl": [ - 228, - 0.13, - 0.44 - ] - }, - "surface1": { - "hex": "51576d", - "rgb": [ - 81, - 87, - 109 - ], - "hsl": [ - 227, - 0.15, - 0.37 - ] - }, - "surface0": { - "hex": "414559", - "rgb": [ - 65, - 69, - 89 - ], - "hsl": [ - 230, - 0.16, - 0.3 - ] - }, - "base": { - "hex": "303446", - "rgb": [ - 48, - 52, - 70 - ], - "hsl": [ - 229, - 0.19, - 0.23 - ] - }, - "mantle": { - "hex": "292c3c", - "rgb": [ - 41, - 44, - 60 - ], - "hsl": [ - 231, - 0.19, - 0.2 - ] - }, - "crust": { - "hex": "232634", - "rgb": [ - 35, - 38, - 52 - ], - "hsl": [ - 229, - 0.2, - 0.17 - ] - } - }, - "macchiato": { - "rosewater": { - "hex": "f4dbd6", - "rgb": [ - 244, - 219, - 214 - ], - "hsl": [ - 10, - 0.58, - 0.9 - ] - }, - "flamingo": { - "hex": "f0c6c6", - "rgb": [ - 240, - 198, - 198 - ], - "hsl": [ - 0, - 0.58, - 0.86 - ] - }, - "pink": { - "hex": "f5bde6", - "rgb": [ - 245, - 189, - 230 - ], - "hsl": [ - 316, - 0.74, - 0.85 - ] - }, - "mauve": { - "hex": "c6a0f6", - "rgb": [ - 198, - 160, - 246 - ], - "hsl": [ - 267, - 0.83, - 0.8 - ] - }, - "red": { - "hex": "ed8796", - "rgb": [ - 237, - 135, - 150 - ], - "hsl": [ - 351, - 0.74, - 0.73 - ] - }, - "maroon": { - "hex": "ee99a0", - "rgb": [ - 238, - 153, - 160 - ], - "hsl": [ - 355, - 0.71, - 0.77 - ] - }, - "peach": { - "hex": "f5a97f", - "rgb": [ - 245, - 169, - 127 - ], - "hsl": [ - 21, - 0.86, - 0.73 - ] - }, - "yellow": { - "hex": "eed49f", - "rgb": [ - 238, - 212, - 159 - ], - "hsl": [ - 40, - 0.7, - 0.78 - ] - }, - "green": { - "hex": "a6da95", - "rgb": [ - 166, - 218, - 149 - ], - "hsl": [ - 105, - 0.48, - 0.72 - ] - }, - "teal": { - "hex": "8bd5ca", - "rgb": [ - 139, - 213, - 202 - ], - "hsl": [ - 171, - 0.47, - 0.69 - ] - }, - "sky": { - "hex": "91d7e3", - "rgb": [ - 145, - 215, - 227 - ], - "hsl": [ - 189, - 0.59, - 0.73 - ] - }, - "sapphire": { - "hex": "7dc4e4", - "rgb": [ - 125, - 196, - 228 - ], - "hsl": [ - 199, - 0.66, - 0.69 - ] - }, - "blue": { - "hex": "8aadf4", - "rgb": [ - 138, - 173, - 244 - ], - "hsl": [ - 220, - 0.83, - 0.75 - ] - }, - "lavender": { - "hex": "b7bdf8", - "rgb": [ - 183, - 189, - 248 - ], - "hsl": [ - 234, - 0.82, - 0.85 - ] - }, - "text": { - "hex": "cad3f5", - "rgb": [ - 202, - 211, - 245 - ], - "hsl": [ - 227, - 0.68, - 0.88 - ] - }, - "subtext1": { - "hex": "b8c0e0", - "rgb": [ - 184, - 192, - 224 - ], - "hsl": [ - 228, - 0.39, - 0.8 - ] - }, - "subtext0": { - "hex": "a5adcb", - "rgb": [ - 165, - 173, - 203 - ], - "hsl": [ - 227, - 0.27, - 0.72 - ] - }, - "overlay2": { - "hex": "939ab7", - "rgb": [ - 147, - 154, - 183 - ], - "hsl": [ - 228, - 0.2, - 0.65 - ] - }, - "overlay1": { - "hex": "8087a2", - "rgb": [ - 128, - 135, - 162 - ], - "hsl": [ - 228, - 0.15, - 0.57 - ] - }, - "overlay0": { - "hex": "6e738d", - "rgb": [ - 110, - 115, - 141 - ], - "hsl": [ - 230, - 0.12, - 0.49 - ] - }, - "surface2": { - "hex": "5b6078", - "rgb": [ - 91, - 96, - 120 - ], - "hsl": [ - 230, - 0.14, - 0.41 - ] - }, - "surface1": { - "hex": "494d64", - "rgb": [ - 73, - 77, - 100 - ], - "hsl": [ - 231, - 0.16, - 0.34 - ] - }, - "surface0": { - "hex": "363a4f", - "rgb": [ - 54, - 58, - 79 - ], - "hsl": [ - 230, - 0.19, - 0.26 - ] - }, - "base": { - "hex": "24273a", - "rgb": [ - 36, - 39, - 58 - ], - "hsl": [ - 232, - 0.23, - 0.18 - ] - }, - "mantle": { - "hex": "1e2030", - "rgb": [ - 30, - 32, - 48 - ], - "hsl": [ - 233, - 0.23, - 0.15 - ] - }, - "crust": { - "hex": "181926", - "rgb": [ - 24, - 25, - 38 - ], - "hsl": [ - 236, - 0.23, - 0.12 - ] - } - }, - "mocha": { - "rosewater": { - "hex": "f5e0dc", - "rgb": [ - 245, - 224, - 220 - ], - "hsl": [ - 10, - 0.56, - 0.91 - ] - }, - "flamingo": { - "hex": "f2cdcd", - "rgb": [ - 242, - 205, - 205 - ], - "hsl": [ - 0, - 0.59, - 0.88 - ] - }, - "pink": { - "hex": "f5c2e7", - "rgb": [ - 245, - 194, - 231 - ], - "hsl": [ - 316, - 0.72, - 0.86 - ] - }, - "mauve": { - "hex": "cba6f7", - "rgb": [ - 203, - 166, - 247 - ], - "hsl": [ - 267, - 0.84, - 0.81 - ] - }, - "red": { - "hex": "f38ba8", - "rgb": [ - 243, - 139, - 168 - ], - "hsl": [ - 343, - 0.81, - 0.75 - ] - }, - "maroon": { - "hex": "eba0ac", - "rgb": [ - 235, - 160, - 172 - ], - "hsl": [ - 350, - 0.65, - 0.77 - ] - }, - "peach": { - "hex": "fab387", - "rgb": [ - 250, - 179, - 135 - ], - "hsl": [ - 23, - 0.92, - 0.75 - ] - }, - "yellow": { - "hex": "f9e2af", - "rgb": [ - 249, - 226, - 175 - ], - "hsl": [ - 41, - 0.86, - 0.83 - ] - }, - "green": { - "hex": "a6e3a1", - "rgb": [ - 166, - 227, - 161 - ], - "hsl": [ - 115, - 0.54, - 0.76 - ] - }, - "teal": { - "hex": "94e2d5", - "rgb": [ - 148, - 226, - 213 - ], - "hsl": [ - 170, - 0.57, - 0.73 - ] - }, - "sky": { - "hex": "89dceb", - "rgb": [ - 137, - 220, - 235 - ], - "hsl": [ - 189, - 0.71, - 0.73 - ] - }, - "sapphire": { - "hex": "74c7ec", - "rgb": [ - 116, - 199, - 236 - ], - "hsl": [ - 199, - 0.76, - 0.69 - ] - }, - "blue": { - "hex": "89b4fa", - "rgb": [ - 137, - 180, - 250 - ], - "hsl": [ - 217, - 0.92, - 0.76 - ] - }, - "lavender": { - "hex": "b4befe", - "rgb": [ - 180, - 190, - 254 - ], - "hsl": [ - 232, - 0.97, - 0.85 - ] - }, - "text": { - "hex": "cdd6f4", - "rgb": [ - 205, - 214, - 244 - ], - "hsl": [ - 226, - 0.64, - 0.88 - ] - }, - "subtext1": { - "hex": "bac2de", - "rgb": [ - 186, - 194, - 222 - ], - "hsl": [ - 227, - 0.35, - 0.8 - ] - }, - "subtext0": { - "hex": "a6adc8", - "rgb": [ - 166, - 173, - 200 - ], - "hsl": [ - 228, - 0.24, - 0.72 - ] - }, - "overlay2": { - "hex": "9399b2", - "rgb": [ - 147, - 153, - 178 - ], - "hsl": [ - 228, - 0.17, - 0.64 - ] - }, - "overlay1": { - "hex": "7f849c", - "rgb": [ - 127, - 132, - 156 - ], - "hsl": [ - 230, - 0.13, - 0.55 - ] - }, - "overlay0": { - "hex": "6c7086", - "rgb": [ - 108, - 112, - 134 - ], - "hsl": [ - 231, - 0.11, - 0.47 - ] - }, - "surface2": { - "hex": "585b70", - "rgb": [ - 88, - 91, - 112 - ], - "hsl": [ - 233, - 0.12, - 0.39 - ] - }, - "surface1": { - "hex": "45475a", - "rgb": [ - 69, - 71, - 90 - ], - "hsl": [ - 234, - 0.13, - 0.31 - ] - }, - "surface0": { - "hex": "313244", - "rgb": [ - 49, - 50, - 68 - ], - "hsl": [ - 237, - 0.16, - 0.23 - ] - }, - "base": { - "hex": "1e1e2e", - "rgb": [ - 30, - 30, - 46 - ], - "hsl": [ - 240, - 0.21, - 0.15 - ] - }, - "mantle": { - "hex": "181825", - "rgb": [ - 24, - 24, - 37 - ], - "hsl": [ - 240, - 0.21, - 0.12 - ] - }, - "crust": { - "hex": "11111b", - "rgb": [ - 17, - 17, - 27 - ], - "hsl": [ - 240, - 0.23, - 0.09 - ] - } - } -} diff --git a/png/catppuccin-frappe.png b/png/catppuccin-frappe.png deleted file mode 100644 index 3703bc7f6f7fb92c85a5cf668d77e0b93a61d04e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1897 zcma)7Yfuwc6kgG35$aSctyp}li?&uxHVFpEP9g;oB_qKIp@dkZn`D!$B-w3t0|8sg zFrtV!9cHkoFx0ApkH(^OeDSE-s#sggs8c}ODL5lVQHainulnfS4H7Kc_Q&q*J>NOs zJ?A_3o?Wj^Su!Ey?GOlpCa9B?sSq?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ajku>FohBB|IXY!Qz*)yM??U^ON{`)+Wn_AJXoxSng|CqL&iqce4 z^^O#l{xT06z5tL*ySZ=#-_|C{~J^=iO^MNt(V7fXUGd@S}PWtru3nrp4RvFJnR zhWP2+T=#EO?KyDXOr85r=4QFxo`%J7H)j7i`Z0dZk}o|Q_Q=Gm?Oh}CK6(F=u(N*t zo;jlV#}u486ylCarnb~oNlw{0UyrHebeGXjTl=5FPgKGuMk@E86Y>n2@xwKC+N)JZ zT3)Q`F{#}Bzy5cY$}gtYS6dwmY@@DaONZnhy55#rD-&_;x}t^r1Dohm=ieSaF#CnH z>e=n=^Gq%FYGi)QwTNzCR;|12c%91f9m*3MrYEnM-P)$TVy6C=H9O8_$W zUHsP5J?RgnJ2s_%-Bt3+6j)(!7I;J!Gca%qgD@k*tT_@u!IPdYjv*Cu-d^78#T>}c z68OJ4Y|`BYjygFxwY>6&zi$=cwzhT*5Mw#0aV#xrxkvIt%eNcuoQ~c1_VUxG*WUA` zxl6DAoEUg*;kwU>cmCY|*ne*A>(ig}BHu4tziHoGpH$iQ(#Y`p{;9UN_v^m?y6W%! zn}3rd?U!|LS{Hx+^sfzjG+$q>tnNL3xNP;_qlJ;>r`Y~?Nhlm)P-NpUbm(Ao;t@z{ f5MXX0Lg)vh-f5}pt)-FIKy{<1tDnm{r-UW|4wR&y diff --git a/png/catppuccin-mocha.png b/png/catppuccin-mocha.png deleted file mode 100644 index 553c5180c6d82cb99002fe954640c10a79cdec20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1884 zcma)7eM}Q)7(dZCg_)V@0uGh)s+-gFuC27vOHT&0N+V?mxVD&y*Y<6D()POEAy*dA zI8j_M3yIE_2r|N$t&0mY zYXi98^+Oy%bm@YhwwC}NwE-97qp(QpAq-_46lPYN6efQba5LHE0Z>q$TWBvYv1=Vz z`iyv;Ktcj9;AvFwdVCxyP?*F^!f(+`V5sE6mr$6+l!s=q0f4G;HLk#B#G|@^!%61r zXZ8le6@|HZ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= parseInt(hex.substring(1, 3), 16) / 255; - const g = parseInt(hex.substring(3, 5), 16) / 255; - const b = parseInt(hex.substring(5, 7), 16) / 255; - - return { - alpha: 1, - red: r, - green: g, - blue: b, - name: key, - createdAt: dateString, - id: crypto.randomUUID().toUpperCase(), - }; - }), - lock: true, - }; - - output.push(data); -} - -output.map((palette) => { - Deno.writeTextFile( - `./${palette.name}.palette`, - JSON.stringify(palette, null, 2), - ); -}); diff --git a/src/index.d.ts b/src/index.d.ts deleted file mode 100644 index 68c537d..0000000 --- a/src/index.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Catppuccin variants - */ -export namespace variants { - /** - * Light variant - */ - const latte: Labels - - /** - * Low-saturation, low-contrast dark variant - */ - const frappe: Labels - - /** - * Mid-saturation, mid-contrast dark variant - */ - const macchiato: Labels - - /** - * High-saturation, High-contrast dark variant - */ - const mocha: Labels -} - -/** - * Palette labels - */ -export namespace labels { - const rosewater: Variants - const flamingo: Variants - const pink: Variants - const mauve: Variants - const red: Variants - const maroon: Variants - const peach: Variants - const yellow: Variants - const green: Variants - const teal: Variants - const sky: Variants - const sapphire: Variants - const blue: Variants - const lavender: Variants - - const surface2: Variants - const subtext0: Variants - const subtext1: Variants - const overlay0: Variants - const overlay2: Variants - const surface0: Variants - const text: Variants - const overlay1: Variants - const surface1: Variants - - const base: Variants - const mantle: Variants - const crust: Variants -} -export default palette - -export interface Color { - /** - * Formatted hex value - * @example #babbf1 - */ - hex: string - /** - * Formatted rgb value - * @example rgb(186, 187, 241) - */ - rgb: string - /** - * Formatted hsl value - * @example hsl(239, 66%, 84%) - */ - hsl: string -} - -export interface AlphaColor extends Color { - alpha: Color -} - -export interface Labels { - - rosewater: T - flamingo: T - pink: T - mauve: T - red: T - maroon: T - peach: T - yellow: T - green: T - teal: T - sky: T - sapphire: T - blue: T - lavender: T - - text: U - subtext1: U - subtext0: U - overlay2: U - overlay1: U - overlay0: U - surface2: U - surface1: U - surface0: U - - base: U - mantle: U - crust: U -} - -export interface Variants { - /** - * Light variant - */ - latte: T - /** - * Low-saturation, low-contrast dark variant - */ - frappe: T - /** - * Mid-saturation, mid-contrast dark variant - */ - macchiato: T - /** - * High-saturation, High-contrast dark variant - */ - mocha: T -} - -declare namespace palette { - /** - * Palette variants - */ - const variants: Variants> - /** - * Palette labels - */ - const labels: Labels, Variants> -} diff --git a/src/index.js b/src/index.js deleted file mode 100644 index a1f16f5..0000000 --- a/src/index.js +++ /dev/null @@ -1,905 +0,0 @@ -const latte = { - rosewater: { - hex: '#dc8a78', - rgb: 'rgb(220, 138, 120)', - hsl: 'hsl(11, 59%, 67%)', - raw: '220, 138, 120' - }, - flamingo: { - hex: '#dd7878', - rgb: 'rgb(221, 120, 120)', - hsl: 'hsl(0, 60%, 67%)', - raw: '221, 120, 120' - }, - pink: { - hex: '#ea76cb', - rgb: 'rgb(234, 118, 203)', - hsl: 'hsl(316, 73%, 69%)', - raw: '234, 118, 203' - }, - mauve: { - hex: '#8839ef', - rgb: 'rgb(136, 57, 239)', - hsl: 'hsl(266, 85%, 58%)', - raw: '136, 57, 239' - }, - red: { - hex: '#d20f39', - rgb: 'rgb(210, 15, 57)', - hsl: 'hsl(347, 87%, 44%)', - raw: '210, 15, 57' - }, - maroon: { - hex: '#e64553', - rgb: 'rgb(230, 69, 83)', - hsl: 'hsl(355, 76%, 59%)', - raw: '230, 69, 83' - }, - peach: { - hex: '#fe640b', - rgb: 'rgb(254, 100, 11)', - hsl: 'hsl(22, 99%, 52%)', - raw: '254, 100, 11' - }, - yellow: { - hex: '#df8e1d', - rgb: 'rgb(223, 142, 29)', - hsl: 'hsl(35, 77%, 49%)', - raw: '223, 142, 29' - }, - green: { - hex: '#40a02b', - rgb: 'rgb(64, 160, 43)', - hsl: 'hsl(109, 58%, 40%)', - raw: '64, 160, 43' - }, - teal: { - hex: '#179299', - rgb: 'rgb(23, 146, 153)', - hsl: 'hsl(183, 74%, 35%)', - raw: '23, 146, 153' - }, - sky: { - hex: '#04a5e5', - rgb: 'rgb(4, 165, 229)', - hsl: 'hsl(197, 97%, 46%)', - raw: '4, 165, 229' - }, - sapphire: { - hex: '#209fb5', - rgb: 'rgb(32, 159, 181)', - hsl: 'hsl(189, 70%, 42%)', - raw: '32, 159, 181' - }, - blue: { - hex: '#1e66f5', - rgb: 'rgb(30, 102, 245)', - hsl: 'hsl(220, 91%, 54%)', - raw: '30, 102, 245' - }, - lavender: { - hex: '#7287fd', - rgb: 'rgb(114, 135, 253)', - hsl: 'hsl(231, 97%, 72%)', - raw: '114, 135, 253' - }, - text: { - hex: '#4c4f69', - rgb: 'rgb(76, 79, 105)', - hsl: 'hsl(234, 16%, 35%)', - raw: '76, 79, 105' - }, - subtext1: { - hex: '#5c5f77', - rgb: 'rgb(92, 95, 119)', - hsl: 'hsl(233, 13%, 41%)', - raw: '92, 95, 119' - }, - subtext0: { - hex: '#6c6f85', - rgb: 'rgb(108, 111, 133)', - hsl: 'hsl(233, 10%, 47%)', - raw: '108, 111, 133' - }, - overlay2: { - hex: '#7c7f93', - rgb: 'rgb(124, 127, 147)', - hsl: 'hsl(232, 10%, 53%)', - raw: '124, 127, 147' - }, - overlay1: { - hex: '#8c8fa1', - rgb: 'rgb(140, 143, 161)', - hsl: 'hsl(231, 10%, 59%)', - raw: '140, 143, 161' - }, - overlay0: { - hex: '#9ca0b0', - rgb: 'rgb(156, 160, 176)', - hsl: 'hsl(228, 11%, 65%)', - raw: '156, 160, 176' - }, - surface2: { - hex: '#acb0be', - rgb: 'rgb(172, 176, 190)', - hsl: 'hsl(227, 12%, 71%)', - raw: '172, 176, 190' - }, - surface1: { - hex: '#bcc0cc', - rgb: 'rgb(188, 192, 204)', - hsl: 'hsl(225, 14%, 77%)', - raw: '188, 192, 204' - }, - surface0: { - hex: '#ccd0da', - rgb: 'rgb(204, 208, 218)', - hsl: 'hsl(223, 16%, 83%)', - raw: '204, 208, 218' - }, - base: { - hex: '#eff1f5', - rgb: 'rgb(239, 241, 245)', - hsl: 'hsl(220, 23%, 95%)', - raw: '239, 241, 245' - }, - mantle: { - hex: '#e6e9ef', - rgb: 'rgb(230, 233, 239)', - hsl: 'hsl(220, 22%, 92%)', - raw: '230, 233, 239' - }, - crust: { - hex: '#dce0e8', - rgb: 'rgb(220, 224, 232)', - hsl: 'hsl(220, 21%, 89%)', - raw: '220, 224, 232' - } -} - -const frappe = { - rosewater: { - hex: '#f2d5cf', - rgb: 'rgb(242, 213, 207)', - hsl: 'hsl(10, 57%, 88%)', - raw: '242, 213, 207' - }, - - flamingo: { - hex: '#eebebe', - rgb: 'rgb(238, 190, 190)', - hsl: 'hsl(0, 59%, 84%)', - raw: '238, 190, 190', - }, - - pink: { - hex: '#f4b8e4', - rgb: 'rgb(244, 184, 228)', - hsl: 'hsl(316, 73%, 84%)', - raw: '244, 184, 228', - }, - - mauve: { - hex: '#ca9ee6', - rgb: 'rgb(202, 158, 230)', - hsl: 'hsl(277, 59%, 76%)', - raw: '202, 158, 230', - }, - - red: { - hex: '#e78284', - rgb: 'rgb(231, 130, 132)', - hsl: 'hsl(359, 68%, 71%)', - raw: '231, 130, 132', - }, - - maroon: { - hex: '#ea999c', - rgb: 'rgb(234, 153, 156)', - hsl: 'hsl(358, 66%, 76%)', - raw: '234, 153, 156', - }, - - peach: { - hex: '#ef9f76', - rgb: 'rgb(239, 159, 118)', - hsl: 'hsl(20, 79%, 70%)', - raw: '239, 159, 118', - }, - - yellow: { - hex: '#e5c890', - rgb: 'rgb(229, 200, 144)', - hsl: 'hsl(40, 62%, 73%)', - raw: '229, 200, 144', - }, - - green: { - hex: '#a6d189', - rgb: 'rgb(166, 209, 137)', - hsl: 'hsl(96, 44%, 68%)', - raw: '166, 209, 137', - }, - - teal: { - hex: '#81c8be', - rgb: 'rgb(129, 200, 190)', - hsl: 'hsl(172, 39%, 65%)', - raw: '129, 200, 190', - }, - - sky: { - hex: '#99d1db', - rgb: 'rgb(153, 209, 219)', - hsl: 'hsl(189, 48%, 73%)', - raw: '153, 209, 219', - }, - - sapphire: { - hex: '#85c1dc', - rgb: 'rgb(133, 193, 220)', - hsl: 'hsl(199, 55%, 69%)', - raw: '133, 193, 220', - }, - - blue: { - hex: '#8caaee', - rgb: 'rgb(140, 170, 238)', - hsl: 'hsl(222, 74%, 74%)', - raw: '140, 170, 238', - }, - - lavender: { - hex: '#babbf1', - rgb: 'rgb(186, 187, 241)', - hsl: 'hsl(239, 66%, 84%)', - raw: '186, 187, 241', - }, - - text: { - hex: '#c6d0f5', - rgb: 'rgb(198, 208, 245)', - hsl: 'hsl(227, 70%, 87%)', - raw: '198, 208, 245' - }, - - subtext1: { - hex: '#b5bfe2', - rgb: 'rgb(181, 191, 226)', - hsl: 'hsl(227, 44%, 80%)', - raw: '181, 191, 226' - }, - - subtext0: { - hex: '#a5adce', - rgb: 'rgb(165, 173, 206)', - hsl: 'hsl(228, 29%, 73%)', - raw: '165, 173, 206' - }, - - overlay2: { - hex: '#949cbb', - rgb: 'rgb(148, 156, 187)', - hsl: 'hsl(228, 22%, 66%)', - raw: '148, 156, 187', - }, - - overlay1: { - hex: '#838ba7', - rgb: 'rgb(131, 139, 167)', - hsl: 'hsl(227, 17%, 58%)', - raw: '131, 139, 167', - }, - - overlay0: { - hex: '#737994', - rgb: 'rgb(115, 121, 148)', - hsl: 'hsl(229, 13%, 52%)', - raw: '115, 121, 148', - }, - - surface2: { - hex: '#626880', - rgb: 'rgb(98, 104, 128)', - hsl: 'hsl(228, 13%, 44%)', - raw: '98, 104, 128', - }, - - surface1: { - hex: '#51576d', - rgb: 'rgb(81, 87, 109)', - hsl: 'hsl(227, 15%, 37%)', - raw: '81, 87, 109', - }, - - surface0: { - hex: '#414559', - rgb: 'rgb(65, 69, 89)', - hsl: 'hsl(230, 16%, 30%)', - raw: '65, 69, 89', - }, - - base: { - hex: '#303446', - rgb: 'rgb(48, 52, 70)', - hsl: 'hsl(229, 19%, 23%)', - raw: '48, 52, 70', - }, - - mantle: { - hex: '#292c3c', - rgb: 'rgb(41, 44, 60)', - hsl: 'hsl(231, 19%, 20%)', - raw: '41, 44, 60', - }, - - crust: { - hex: '#232634', - rgb: 'rgb(35, 38, 52)', - hsl: 'hsl(229, 20%, 17%)', - raw: '35, 38, 52', - }, -} - -const macchiato = { - rosewater: { - hex: '#f4dbd6', - rgb: 'rgb(244, 219, 214)', - hsl: 'hsl(10, 58%, 90%)', - raw: '244, 219, 214', - }, - - flamingo: { - hex: '#f0c6c6', - rgb: 'rgb(240, 198, 198)', - hsl: 'hsl(0, 58%, 86%)', - raw: '240, 198, 198', - }, - - pink: { - hex: '#f5bde6', - rgb: 'rgb(245, 189, 230)', - hsl: 'hsl(316, 74%, 85%)', - raw: '245, 189, 230', - }, - - mauve: { - hex: '#c6a0f6', - rgb: 'rgb(198, 160, 246)', - hsl: 'hsl(267, 83%, 80%)', - raw: '198, 160, 246', - }, - - red: { - hex: '#ed8796', - rgb: 'rgb(237, 135, 150)', - hsl: 'hsl(351, 74%, 73%)', - raw: '237, 135, 150', - }, - - maroon: { - hex: '#ee99a0', - rgb: 'rgb(238, 153, 160)', - hsl: 'hsl(355, 71%, 77%)', - raw: '238, 153, 160', - }, - - peach: { - hex: '#f5a97f', - rgb: 'rgb(245, 169, 127)', - hsl: 'hsl(21, 86%, 73%)', - raw: '245, 169, 127', - }, - - yellow: { - hex: '#eed49f', - rgb: 'rgb(238, 212, 159)', - hsl: 'hsl(40, 70%, 78%)', - raw: '238, 212, 159', - }, - - green: { - hex: '#a6da95', - rgb: 'rgb(166, 218, 149)', - hsl: 'hsl(105, 48%, 72%)', - raw: '166, 218, 149', - }, - - teal: { - hex: '#8bd5ca', - rgb: 'rgb(139, 213, 202)', - hsl: 'hsl(171, 47%, 69%)', - raw: '139, 213, 202', - }, - - sky: { - hex: '#91d7e3', - rgb: 'rgb(145, 215, 227)', - hsl: 'hsl(189, 59%, 73%)', - raw: '145, 215, 227', - }, - - sapphire: { - hex: '#7dc4e4', - rgb: 'rgb(125, 196, 228)', - hsl: 'hsl(199, 66%, 69%)', - raw: '125, 196, 228', - }, - - blue: { - hex: '#8aadf4', - rgb: 'rgb(138, 173, 244)', - hsl: 'hsl(220, 83%, 75%)', - raw: '138, 173, 244', - }, - - lavender: { - hex: '#b7bdf8', - rgb: 'rgb(183, 189, 248)', - hsl: 'hsl(234, 82%, 85%)', - raw: '183, 189, 248', - }, - - text: { - hex: '#cad3f5', - rgb: 'rgb(202, 211, 245)', - hsl: 'hsl(227, 68%, 88%)', - raw: '202, 211, 245', - }, - - subtext1: { - hex: '#b8c0e0', - rgb: 'rgb(184, 192, 224)', - hsl: 'hsl(228, 39%, 80%)', - raw: '184, 192, 224', - }, - - subtext0: { - hex: '#a5adcb', - rgb: 'rgb(165, 173, 203)', - hsl: 'hsl(227, 27%, 72%)', - raw: '165, 173, 203', - }, - - overlay2: { - hex: '#939ab7', - rgb: 'rgb(147, 154, 183)', - hsl: 'hsl(228, 20%, 65%)', - raw: '147, 154, 183', - }, - - overlay1: { - hex: '#8087a2', - rgb: 'rgb(128, 135, 162)', - hsl: 'hsl(228, 15%, 57%)', - raw: '128, 135, 162', - }, - - overlay0: { - hex: '#6e738d', - rgb: 'rgb(110, 115, 141)', - hsl: 'hsl(230, 12%, 49%)', - raw: '110, 115, 141', - }, - - surface2: { - hex: '#5b6078', - rgb: 'rgb(91, 96, 120)', - hsl: 'hsl(230, 14%, 41%)', - raw: '91, 96, 120', - }, - - surface1: { - hex: '#494d64', - rgb: 'rgb(73, 77, 100)', - hsl: 'hsl(231, 16%, 34%)', - raw: '73, 77, 100', - }, - - surface0: { - hex: '#363a4f', - rgb: 'rgb(54, 58, 79)', - hsl: 'hsl(230, 19%, 26%)', - raw: '54, 58, 79', - }, - - base: { - hex: '#24273a', - rgb: 'rgb(36, 39, 58)', - hsl: 'hsl(232, 23%, 18%)', - raw: '36, 39, 58', - }, - - mantle: { - hex: '#1e2030', - rgb: 'rgb(30, 32, 48)', - hsl: 'hsl(233, 23%, 15%)', - raw: '30, 32, 48', - }, - - crust: { - hex: '#181926', - rgb: 'rgb(24, 25, 38)', - hsl: 'hsl(236, 23%, 12%)', - raw: '24, 25, 38', - }, -} - -const mocha = { - rosewater: { - hex: '#f5e0dc', - rgb: 'rgb(245, 224, 220)', - hsl: 'hsl(10, 56%, 91%)', - raw: '245, 224, 220', - }, - - flamingo: { - hex: '#f2cdcd', - rgb: 'rgb(242, 205, 205)', - hsl: 'hsl(0, 59%, 88%)', - raw: '242, 205, 205', - }, - - pink: { - hex: '#f5c2e7', - rgb: 'rgb(245, 194, 231)', - hsl: 'hsl(316, 72%, 86%)', - raw: '245, 194, 231', - }, - - mauve: { - hex: '#cba6f7', - rgb: 'rgb(203, 166, 247)', - hsl: 'hsl(267, 84%, 81%)', - raw: '203, 166, 247', - }, - - red: { - hex: '#f38ba8', - rgb: 'rgb(243, 139, 168)', - hsl: 'hsl(343, 81%, 75%)', - raw: '243, 139, 168', - }, - - maroon: { - hex: '#eba0ac', - rgb: 'rgb(235, 160, 172)', - hsl: 'hsl(350, 65%, 77%)', - raw: '235, 160, 172', - }, - - peach: { - hex: '#fab387', - rgb: 'rgb(250, 179, 135)', - hsl: 'hsl(23, 92%, 75%)', - raw: '250, 179, 135', - }, - - yellow: { - hex: '#f9e2af', - rgb: 'rgb(249, 226, 175)', - hsl: 'hsl(41, 86%, 83%)', - raw: '249, 226, 175', - }, - - green: { - hex: '#a6e3a1', - rgb: 'rgb(166, 227, 161)', - hsl: 'hsl(115, 54%, 76%)', - raw: '166, 227, 161', - }, - - teal: { - hex: '#94e2d5', - rgb: 'rgb(148, 226, 213)', - hsl: 'hsl(170, 57%, 73%)', - raw: '148, 226, 213', - }, - - sky: { - hex: '#89dceb', - rgb: 'rgb(137, 220, 235)', - hsl: 'hsl(189, 71%, 73%)', - raw: '137, 220, 235', - }, - - sapphire: { - hex: '#74c7ec', - rgb: 'rgb(116, 199, 236)', - hsl: 'hsl(199, 76%, 69%)', - raw: '116, 199, 236', - }, - - blue: { - hex: '#89b4fa', - rgb: 'rgb(137, 180, 250)', - hsl: 'hsl(217, 92%, 76%)', - raw: '137, 180, 250', - }, - - lavender: { - hex: '#b4befe', - rgb: 'rgb(180, 190, 254)', - hsl: 'hsl(232, 97%, 85%)', - raw: '180, 190, 254', - }, - - text: { - hex: '#cdd6f4', - rgb: 'rgb(205, 214, 244)', - hsl: 'hsl(226, 64%, 88%)', - raw: '205, 214, 244', - }, - - subtext1: { - hex: '#bac2de', - rgb: 'rgb(186, 194, 222)', - hsl: 'hsl(227, 35%, 80%)', - raw: '186, 194, 222', - }, - - subtext0: { - hex: '#a6adc8', - rgb: 'rgb(166, 173, 200)', - hsl: 'hsl(228, 24%, 72%)', - raw: '166, 173, 200', - }, - - overlay2: { - hex: '#9399b2', - rgb: 'rgb(147, 153, 178)', - hsl: 'hsl(228, 17%, 64%)', - raw: '147, 153, 178', - }, - - overlay1: { - hex: '#7f849c', - rgb: 'rgb(127, 132, 156)', - hsl: 'hsl(230, 13%, 55%)', - raw: '127, 132, 156', - }, - - overlay0: { - hex: '#6c7086', - rgb: 'rgb(108, 112, 134)', - hsl: 'hsl(231, 11%, 47%)', - raw: '108, 112, 134', - }, - - surface2: { - hex: '#585b70', - rgb: 'rgb(88, 91, 112)', - hsl: 'hsl(233, 12%, 39%)', - raw: '88, 91, 112', - }, - - surface1: { - hex: '#45475a', - rgb: 'rgb(69, 71, 90)', - hsl: 'hsl(234, 13%, 31%)', - raw: '69, 71, 90', - }, - - surface0: { - hex: '#313244', - rgb: 'rgb(49, 50, 68)', - hsl: 'hsl(237, 16%, 23%)', - raw: '49, 50, 68', - }, - - base: { - hex: '#1e1e2e', - rgb: 'rgb(30, 30, 46)', - hsl: 'hsl(240, 21%, 15%)', - raw: '30, 30, 46', - }, - - mantle: { - hex: '#181825', - rgb: 'rgb(24, 24, 37)', - hsl: 'hsl(240, 21%, 12%)', - raw: '24, 24, 37', - }, - - crust: { - hex: '#11111b', - rgb: 'rgb(17, 17, 27)', - hsl: 'hsl(240, 23%, 9%)', - raw: '17, 17, 27', - }, -} - -const palettes = { - variants: { - latte, - frappe, - macchiato, - mocha, - }, - labels: { - rosewater: { - latte: latte.rosewater, - frappe: frappe.rosewater, - macchiato: macchiato.rosewater, - mocha: mocha.rosewater, - }, - - flamingo: { - latte: latte.flamingo, - frappe: frappe.flamingo, - macchiato: macchiato.flamingo, - mocha: mocha.flamingo, - }, - - pink: { - latte: latte.pink, - frappe: frappe.pink, - macchiato: macchiato.pink, - mocha: mocha.pink, - }, - - mauve: { - latte: latte.mauve, - frappe: frappe.mauve, - macchiato: macchiato.mauve, - mocha: mocha.mauve, - }, - - red: { - latte: latte.red, - frappe: frappe.red, - macchiato: macchiato.red, - mocha: mocha.red, - }, - - maroon: { - latte: latte.maroon, - frappe: frappe.maroon, - macchiato: macchiato.maroon, - mocha: mocha.maroon, - }, - - peach: { - latte: latte.peach, - frappe: frappe.peach, - macchiato: macchiato.peach, - mocha: mocha.peach, - }, - - yellow: { - latte: latte.yellow, - frappe: frappe.yellow, - macchiato: macchiato.yellow, - mocha: mocha.yellow, - }, - - green: { - latte: latte.green, - frappe: frappe.green, - macchiato: macchiato.green, - mocha: mocha.green, - }, - - teal: { - latte: latte.teal, - frappe: frappe.teal, - macchiato: macchiato.teal, - mocha: mocha.teal, - }, - - sky: { - latte: latte.sky, - frappe: frappe.sky, - macchiato: macchiato.sky, - mocha: mocha.sky, - }, - - sapphire: { - latte: latte.sapphire, - frappe: frappe.sapphire, - macchiato: macchiato.sapphire, - mocha: mocha.sapphire, - }, - - blue: { - latte: latte.blue, - frappe: frappe.blue, - macchiato: macchiato.blue, - mocha: mocha.blue, - }, - - lavender: { - latte: latte.lavender, - frappe: frappe.lavender, - macchiato: macchiato.lavender, - mocha: mocha.lavender, - }, - - text: { - latte: latte.text, - frappe: frappe.text, - macchiato: macchiato.text, - mocha: mocha.text, - }, - - subtext1: { - latte: latte.subtext1, - frappe: frappe.subtext1, - macchiato: macchiato.subtext1, - mocha: mocha.subtext1, - }, - - subtext0: { - latte: latte.subtext0, - frappe: frappe.subtext0, - macchiato: macchiato.subtext0, - mocha: mocha.subtext0, - }, - - overlay2: { - latte: latte.overlay2, - frappe: frappe.overlay2, - macchiato: macchiato.overlay2, - mocha: mocha.overlay2, - }, - - overlay1: { - latte: latte.overlay1, - frappe: frappe.overlay1, - macchiato: macchiato.overlay1, - mocha: mocha.overlay1, - }, - - overlay0: { - latte: latte.overlay0, - frappe: frappe.overlay0, - macchiato: macchiato.overlay0, - mocha: mocha.overlay0, - }, - - surface2: { - latte: latte.surface2, - frappe: frappe.surface2, - macchiato: macchiato.surface2, - mocha: mocha.surface2, - }, - - surface1: { - latte: latte.surface1, - frappe: frappe.surface1, - macchiato: macchiato.surface1, - mocha: mocha.surface1, - }, - - surface0: { - latte: latte.surface0, - frappe: frappe.surface0, - macchiato: macchiato.surface0, - mocha: mocha.surface0, - }, - - base: { - latte: latte.base, - frappe: frappe.base, - macchiato: macchiato.base, - mocha: mocha.base, - }, - - mantle: { - latte: latte.mantle, - frappe: frappe.mantle, - macchiato: macchiato.mantle, - mocha: mocha.mantle, - }, - - crust: { - latte: latte.crust, - frappe: frappe.crust, - macchiato: macchiato.crust, - mocha: mocha.crust, - }, - }, -} - -export const {variants, labels} = palettes -export default palettes diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..3bed41a --- /dev/null +++ b/src/index.ts @@ -0,0 +1,726 @@ +const latte = { + rosewater: { + hex: "dc8a78", + rgb: { r: 220, g: 138, b: 120 }, + hsl: { h: 11, s: 59, l: 67 }, + }, + flamingo: { + hex: "dd7878", + rgb: { r: 221, g: 120, b: 120 }, + hsl: { h: 0, s: 60, l: 67 }, + }, + pink: { + hex: "ea76cb", + rgb: { r: 234, g: 118, b: 203 }, + hsl: { h: 316, s: 73, l: 69 }, + }, + mauve: { + hex: "8839ef", + rgb: { r: 136, g: 57, b: 239 }, + hsl: { h: 266, s: 85, l: 58 }, + }, + red: { + hex: "d20f39", + rgb: { r: 210, g: 15, b: 57 }, + hsl: { h: 347, s: 87, l: 44 }, + }, + maroon: { + hex: "e64553", + rgb: { r: 230, g: 69, b: 83 }, + hsl: { h: 355, s: 76, l: 59 }, + }, + peach: { + hex: "fe640b", + rgb: { r: 254, g: 100, b: 11 }, + hsl: { h: 22, s: 99, l: 52 }, + }, + yellow: { + hex: "df8e1d", + rgb: { r: 223, g: 142, b: 29 }, + hsl: { h: 35, s: 77, l: 49 }, + }, + green: { + hex: "40a02b", + rgb: { r: 64, g: 160, b: 43 }, + hsl: { h: 109, s: 58, l: 40 }, + }, + teal: { + hex: "179299", + rgb: { r: 23, g: 146, b: 153 }, + hsl: { h: 183, s: 74, l: 35 }, + }, + sky: { + hex: "04a5e5", + rgb: { r: 4, g: 165, b: 229 }, + hsl: { h: 197, s: 97, l: 46 }, + }, + sapphire: { + hex: "209fb5", + rgb: { r: 32, g: 159, b: 181 }, + hsl: { h: 189, s: 70, l: 42 }, + }, + blue: { + hex: "1e66f5", + rgb: { r: 30, g: 102, b: 245 }, + hsl: { h: 220, s: 91, l: 54 }, + }, + lavender: { + hex: "7287fd", + rgb: { r: 114, g: 135, b: 253 }, + hsl: { h: 231, s: 97, l: 72 }, + }, + text: { + hex: "4c4f69", + rgb: { r: 76, g: 79, b: 105 }, + hsl: { h: 234, s: 16, l: 35 }, + }, + subtext1: { + hex: "5c5f77", + rgb: { r: 92, g: 95, b: 119 }, + hsl: { h: 233, s: 13, l: 41 }, + }, + subtext0: { + hex: "6c6f85", + rgb: { r: 108, g: 111, b: 133 }, + hsl: { h: 233, s: 10, l: 47 }, + }, + overlay2: { + hex: "7c7f93", + rgb: { r: 124, g: 127, b: 147 }, + hsl: { h: 232, s: 10, l: 53 }, + }, + overlay1: { + hex: "8c8fa1", + rgb: { r: 140, g: 143, b: 161 }, + hsl: { h: 231, s: 10, l: 59 }, + }, + overlay0: { + hex: "9ca0b0", + rgb: { r: 156, g: 160, b: 176 }, + hsl: { h: 228, s: 11, l: 65 }, + }, + surface2: { + hex: "acb0be", + rgb: { r: 172, g: 176, b: 190 }, + hsl: { h: 227, s: 12, l: 71 }, + }, + surface1: { + hex: "bcc0cc", + rgb: { r: 188, g: 192, b: 204 }, + hsl: { h: 225, s: 14, l: 77 }, + }, + surface0: { + hex: "ccd0da", + rgb: { r: 204, g: 208, b: 218 }, + hsl: { h: 223, s: 16, l: 83 }, + }, + base: { + hex: "eff1f5", + rgb: { r: 239, g: 241, b: 245 }, + hsl: { h: 220, s: 23, l: 95 }, + }, + mantle: { + hex: "e6e9ef", + rgb: { r: 230, g: 233, b: 239 }, + hsl: { h: 220, s: 22, l: 92 }, + }, + crust: { + hex: "dce0e8", + rgb: { r: 220, g: 224, b: 232 }, + hsl: { h: 220, s: 21, l: 89 }, + }, +}; + +const frappe = { + rosewater: { + hex: "f2d5cf", + rgb: { r: 242, g: 213, b: 207 }, + hsl: { h: 10, s: 57, l: 88 }, + }, + flamingo: { + hex: "eebebe", + rgb: { r: 238, g: 190, b: 190 }, + hsl: { h: 0, s: 59, l: 84 }, + }, + pink: { + hex: "f4b8e4", + rgb: { r: 244, g: 184, b: 228 }, + hsl: { h: 316, s: 73, l: 84 }, + }, + mauve: { + hex: "ca9ee6", + rgb: { r: 202, g: 158, b: 230 }, + hsl: { h: 277, s: 59, l: 76 }, + }, + red: { + hex: "e78284", + rgb: { r: 231, g: 130, b: 132 }, + hsl: { h: 359, s: 68, l: 71 }, + }, + maroon: { + hex: "ea999c", + rgb: { r: 234, g: 153, b: 156 }, + hsl: { h: 358, s: 66, l: 76 }, + }, + peach: { + hex: "ef9f76", + rgb: { r: 239, g: 159, b: 118 }, + hsl: { h: 20, s: 79, l: 70 }, + }, + yellow: { + hex: "e5c890", + rgb: { r: 229, g: 200, b: 144 }, + hsl: { h: 40, s: 62, l: 73 }, + }, + green: { + hex: "a6d189", + rgb: { r: 166, g: 209, b: 137 }, + hsl: { h: 96, s: 44, l: 68 }, + }, + teal: { + hex: "81c8be", + rgb: { r: 129, g: 200, b: 190 }, + hsl: { h: 172, s: 39, l: 65 }, + }, + sky: { + hex: "99d1db", + rgb: { r: 153, g: 209, b: 219 }, + hsl: { h: 189, s: 48, l: 73 }, + }, + sapphire: { + hex: "85c1dc", + rgb: { r: 133, g: 193, b: 220 }, + hsl: { h: 199, s: 55, l: 69 }, + }, + blue: { + hex: "8caaee", + rgb: { r: 140, g: 170, b: 238 }, + hsl: { h: 222, s: 74, l: 74 }, + }, + lavender: { + hex: "babbf1", + rgb: { r: 186, g: 187, b: 241 }, + hsl: { h: 239, s: 66, l: 84 }, + }, + text: { + hex: "c6d0f5", + rgb: { r: 198, g: 208, b: 245 }, + hsl: { h: 227, s: 70, l: 87 }, + }, + subtext1: { + hex: "b5bfe2", + rgb: { r: 181, g: 191, b: 226 }, + hsl: { h: 227, s: 44, l: 80 }, + }, + subtext0: { + hex: "a5adce", + rgb: { r: 165, g: 173, b: 206 }, + hsl: { h: 228, s: 29, l: 73 }, + }, + overlay2: { + hex: "949cbb", + rgb: { r: 148, g: 156, b: 187 }, + hsl: { h: 228, s: 22, l: 66 }, + }, + overlay1: { + hex: "838ba7", + rgb: { r: 131, g: 139, b: 167 }, + hsl: { h: 227, s: 17, l: 58 }, + }, + overlay0: { + hex: "737994", + rgb: { r: 115, g: 121, b: 148 }, + hsl: { h: 229, s: 13, l: 52 }, + }, + surface2: { + hex: "626880", + rgb: { r: 98, g: 104, b: 128 }, + hsl: { h: 228, s: 13, l: 44 }, + }, + surface1: { + hex: "51576d", + rgb: { r: 81, g: 87, b: 109 }, + hsl: { h: 227, s: 15, l: 37 }, + }, + surface0: { + hex: "414559", + rgb: { r: 65, g: 69, b: 89 }, + hsl: { h: 230, s: 16, l: 30 }, + }, + base: { + hex: "303446", + rgb: { r: 48, g: 52, b: 70 }, + hsl: { h: 229, s: 19, l: 23 }, + }, + mantle: { + hex: "292c3c", + rgb: { r: 41, g: 44, b: 60 }, + hsl: { h: 231, s: 19, l: 20 }, + }, + crust: { + hex: "232634", + rgb: { r: 35, g: 38, b: 52 }, + hsl: { h: 229, s: 20, l: 17 }, + }, +}; + +const macchiato = { + rosewater: { + hex: "f4dbd6", + rgb: { r: 244, g: 219, b: 214 }, + hsl: { h: 10, s: 58, l: 90 }, + }, + flamingo: { + hex: "f0c6c6", + rgb: { r: 240, g: 198, b: 198 }, + hsl: { h: 0, s: 58, l: 86 }, + }, + pink: { + hex: "f5bde6", + rgb: { r: 245, g: 189, b: 230 }, + hsl: { h: 316, s: 74, l: 85 }, + }, + mauve: { + hex: "c6a0f6", + rgb: { r: 198, g: 160, b: 246 }, + hsl: { h: 267, s: 83, l: 80 }, + }, + red: { + hex: "ed8796", + rgb: { r: 237, g: 135, b: 150 }, + hsl: { h: 351, s: 74, l: 73 }, + }, + maroon: { + hex: "ee99a0", + rgb: { r: 238, g: 153, b: 160 }, + hsl: { h: 355, s: 71, l: 77 }, + }, + peach: { + hex: "f5a97f", + rgb: { r: 245, g: 169, b: 127 }, + hsl: { h: 21, s: 86, l: 73 }, + }, + yellow: { + hex: "eed49f", + rgb: { r: 238, g: 212, b: 159 }, + hsl: { h: 40, s: 70, l: 78 }, + }, + green: { + hex: "a6da95", + rgb: { r: 166, g: 218, b: 149 }, + hsl: { h: 105, s: 48, l: 72 }, + }, + teal: { + hex: "8bd5ca", + rgb: { r: 139, g: 213, b: 202 }, + hsl: { h: 171, s: 47, l: 69 }, + }, + sky: { + hex: "91d7e3", + rgb: { r: 145, g: 215, b: 227 }, + hsl: { h: 189, s: 59, l: 73 }, + }, + sapphire: { + hex: "7dc4e4", + rgb: { r: 125, g: 196, b: 228 }, + hsl: { h: 199, s: 66, l: 69 }, + }, + blue: { + hex: "8aadf4", + rgb: { r: 138, g: 173, b: 244 }, + hsl: { h: 220, s: 83, l: 75 }, + }, + lavender: { + hex: "b7bdf8", + rgb: { r: 183, g: 189, b: 248 }, + hsl: { h: 234, s: 82, l: 85 }, + }, + text: { + hex: "cad3f5", + rgb: { r: 202, g: 211, b: 245 }, + hsl: { h: 227, s: 68, l: 88 }, + }, + subtext1: { + hex: "b8c0e0", + rgb: { r: 184, g: 192, b: 224 }, + hsl: { h: 228, s: 39, l: 80 }, + }, + subtext0: { + hex: "a5adcb", + rgb: { r: 165, g: 173, b: 203 }, + hsl: { h: 227, s: 27, l: 72 }, + }, + overlay2: { + hex: "939ab7", + rgb: { r: 147, g: 154, b: 183 }, + hsl: { h: 228, s: 20, l: 65 }, + }, + overlay1: { + hex: "8087a2", + rgb: { r: 128, g: 135, b: 162 }, + hsl: { h: 228, s: 15, l: 57 }, + }, + overlay0: { + hex: "6e738d", + rgb: { r: 110, g: 115, b: 141 }, + hsl: { h: 230, s: 12, l: 49 }, + }, + surface2: { + hex: "5b6078", + rgb: { r: 91, g: 96, b: 120 }, + hsl: { h: 230, s: 14, l: 41 }, + }, + surface1: { + hex: "494d64", + rgb: { r: 73, g: 77, b: 100 }, + hsl: { h: 231, s: 16, l: 34 }, + }, + surface0: { + hex: "363a4f", + rgb: { r: 54, g: 58, b: 79 }, + hsl: { h: 230, s: 19, l: 26 }, + }, + base: { + hex: "24273a", + rgb: { r: 36, g: 39, b: 58 }, + hsl: { h: 232, s: 23, l: 18 }, + }, + mantle: { + hex: "1e2030", + rgb: { r: 30, g: 32, b: 48 }, + hsl: { h: 233, s: 23, l: 15 }, + }, + crust: { + hex: "181926", + rgb: { r: 24, g: 25, b: 38 }, + hsl: { h: 236, s: 23, l: 12 }, + }, +}; + +const mocha = { + rosewater: { + hex: "f5e0dc", + rgb: { r: 245, g: 224, b: 220 }, + hsl: { h: 10, s: 56, l: 91 }, + }, + flamingo: { + hex: "f2cdcd", + rgb: { r: 242, g: 205, b: 205 }, + hsl: { h: 0, s: 59, l: 88 }, + }, + pink: { + hex: "f5c2e7", + rgb: { r: 245, g: 194, b: 231 }, + hsl: { h: 316, s: 72, l: 86 }, + }, + mauve: { + hex: "cba6f7", + rgb: { r: 203, g: 166, b: 247 }, + hsl: { h: 267, s: 84, l: 81 }, + }, + red: { + hex: "f38ba8", + rgb: { r: 243, g: 139, b: 168 }, + hsl: { h: 343, s: 81, l: 75 }, + }, + maroon: { + hex: "eba0ac", + rgb: { r: 235, g: 160, b: 172 }, + hsl: { h: 350, s: 65, l: 77 }, + }, + peach: { + hex: "fab387", + rgb: { r: 250, g: 179, b: 135 }, + hsl: { h: 23, s: 92, l: 75 }, + }, + yellow: { + hex: "f9e2af", + rgb: { r: 249, g: 226, b: 175 }, + hsl: { h: 41, s: 86, l: 83 }, + }, + green: { + hex: "a6e3a1", + rgb: { r: 166, g: 227, b: 161 }, + hsl: { h: 115, s: 54, l: 76 }, + }, + teal: { + hex: "94e2d5", + rgb: { r: 148, g: 226, b: 213 }, + hsl: { h: 170, s: 57, l: 73 }, + }, + sky: { + hex: "89dceb", + rgb: { r: 137, g: 220, b: 235 }, + hsl: { h: 189, s: 71, l: 73 }, + }, + sapphire: { + hex: "74c7ec", + rgb: { r: 116, g: 199, b: 236 }, + hsl: { h: 199, s: 76, l: 69 }, + }, + blue: { + hex: "89b4fa", + rgb: { r: 137, g: 180, b: 250 }, + hsl: { h: 217, s: 92, l: 76 }, + }, + lavender: { + hex: "b4befe", + rgb: { r: 180, g: 190, b: 254 }, + hsl: { h: 232, s: 97, l: 85 }, + }, + text: { + hex: "cdd6f4", + rgb: { r: 205, g: 214, b: 244 }, + hsl: { h: 226, s: 64, l: 88 }, + }, + subtext1: { + hex: "bac2de", + rgb: { r: 186, g: 194, b: 222 }, + hsl: { h: 227, s: 35, l: 80 }, + }, + subtext0: { + hex: "a6adc8", + rgb: { r: 166, g: 173, b: 200 }, + hsl: { h: 228, s: 24, l: 72 }, + }, + overlay2: { + hex: "9399b2", + rgb: { r: 147, g: 153, b: 178 }, + hsl: { h: 228, s: 17, l: 64 }, + }, + overlay1: { + hex: "7f849c", + rgb: { r: 127, g: 132, b: 156 }, + hsl: { h: 230, s: 13, l: 55 }, + }, + overlay0: { + hex: "6c7086", + rgb: { r: 108, g: 112, b: 134 }, + hsl: { h: 231, s: 11, l: 47 }, + }, + surface2: { + hex: "585b70", + rgb: { r: 88, g: 91, b: 112 }, + hsl: { h: 233, s: 12, l: 39 }, + }, + surface1: { + hex: "45475a", + rgb: { r: 69, g: 71, b: 90 }, + hsl: { h: 234, s: 13, l: 31 }, + }, + surface0: { + hex: "313244", + rgb: { r: 49, g: 50, b: 68 }, + hsl: { h: 237, s: 16, l: 23 }, + }, + base: { + hex: "1e1e2e", + rgb: { r: 30, g: 30, b: 46 }, + hsl: { h: 240, s: 21, l: 15 }, + }, + mantle: { + hex: "181825", + rgb: { r: 24, g: 24, b: 37 }, + hsl: { h: 240, s: 21, l: 12 }, + }, + crust: { + hex: "11111b", + rgb: { r: 17, g: 17, b: 27 }, + hsl: { h: 240, s: 23, l: 9 }, + }, +}; + +const palettes = { + variants: { + latte, + frappe, + macchiato, + mocha, + }, + labels: { + rosewater: { + latte: latte.rosewater, + frappe: frappe.rosewater, + macchiato: macchiato.rosewater, + mocha: mocha.rosewater, + }, + + flamingo: { + latte: latte.flamingo, + frappe: frappe.flamingo, + macchiato: macchiato.flamingo, + mocha: mocha.flamingo, + }, + + pink: { + latte: latte.pink, + frappe: frappe.pink, + macchiato: macchiato.pink, + mocha: mocha.pink, + }, + + mauve: { + latte: latte.mauve, + frappe: frappe.mauve, + macchiato: macchiato.mauve, + mocha: mocha.mauve, + }, + + red: { + latte: latte.red, + frappe: frappe.red, + macchiato: macchiato.red, + mocha: mocha.red, + }, + + maroon: { + latte: latte.maroon, + frappe: frappe.maroon, + macchiato: macchiato.maroon, + mocha: mocha.maroon, + }, + + peach: { + latte: latte.peach, + frappe: frappe.peach, + macchiato: macchiato.peach, + mocha: mocha.peach, + }, + + yellow: { + latte: latte.yellow, + frappe: frappe.yellow, + macchiato: macchiato.yellow, + mocha: mocha.yellow, + }, + + green: { + latte: latte.green, + frappe: frappe.green, + macchiato: macchiato.green, + mocha: mocha.green, + }, + + teal: { + latte: latte.teal, + frappe: frappe.teal, + macchiato: macchiato.teal, + mocha: mocha.teal, + }, + + sky: { + latte: latte.sky, + frappe: frappe.sky, + macchiato: macchiato.sky, + mocha: mocha.sky, + }, + + sapphire: { + latte: latte.sapphire, + frappe: frappe.sapphire, + macchiato: macchiato.sapphire, + mocha: mocha.sapphire, + }, + + blue: { + latte: latte.blue, + frappe: frappe.blue, + macchiato: macchiato.blue, + mocha: mocha.blue, + }, + + lavender: { + latte: latte.lavender, + frappe: frappe.lavender, + macchiato: macchiato.lavender, + mocha: mocha.lavender, + }, + + text: { + latte: latte.text, + frappe: frappe.text, + macchiato: macchiato.text, + mocha: mocha.text, + }, + + subtext1: { + latte: latte.subtext1, + frappe: frappe.subtext1, + macchiato: macchiato.subtext1, + mocha: mocha.subtext1, + }, + + subtext0: { + latte: latte.subtext0, + frappe: frappe.subtext0, + macchiato: macchiato.subtext0, + mocha: mocha.subtext0, + }, + + overlay2: { + latte: latte.overlay2, + frappe: frappe.overlay2, + macchiato: macchiato.overlay2, + mocha: mocha.overlay2, + }, + + overlay1: { + latte: latte.overlay1, + frappe: frappe.overlay1, + macchiato: macchiato.overlay1, + mocha: mocha.overlay1, + }, + + overlay0: { + latte: latte.overlay0, + frappe: frappe.overlay0, + macchiato: macchiato.overlay0, + mocha: mocha.overlay0, + }, + + surface2: { + latte: latte.surface2, + frappe: frappe.surface2, + macchiato: macchiato.surface2, + mocha: mocha.surface2, + }, + + surface1: { + latte: latte.surface1, + frappe: frappe.surface1, + macchiato: macchiato.surface1, + mocha: mocha.surface1, + }, + + surface0: { + latte: latte.surface0, + frappe: frappe.surface0, + macchiato: macchiato.surface0, + mocha: mocha.surface0, + }, + + base: { + latte: latte.base, + frappe: frappe.base, + macchiato: macchiato.base, + mocha: mocha.base, + }, + + mantle: { + latte: latte.mantle, + frappe: frappe.mantle, + macchiato: macchiato.mantle, + mocha: mocha.mantle, + }, + + crust: { + latte: latte.crust, + frappe: frappe.crust, + macchiato: macchiato.crust, + mocha: mocha.crust, + }, + }, +}; + +export const { variants, labels } = palettes; +export default palettes; diff --git a/src/scripts/build_palettes.mjs b/src/scripts/build_palettes.mjs new file mode 100644 index 0000000..aa736d4 --- /dev/null +++ b/src/scripts/build_palettes.mjs @@ -0,0 +1,79 @@ +import fs from "fs/promises"; +import crypto from "crypto"; +import { variants } from "@catppuccin/palette"; +import url from "url"; +import path from "path"; + +const root = path.resolve( + url.fileURLToPath(new URL(".", import.meta.url)), + "..", + "..", + "palettes" +); +const dateString = new Date() + .toISOString() + .replace(/T/, " ") + .replace(/\..+/, ""); + +const generateSip = (name, palette) => { + const data = { + cloud: true, + updatedAt: dateString, + sip: { + version: "2.6", + build: "260", + }, + id: crypto.randomUUID().toUpperCase(), + readOnly: false, + createdAt: dateString, + dock: false, + name: name, + index: 1, + originalName: name, + like: false, + colors: Object.entries(palette).map(([key, value]) => { + return { + alpha: 1, + red: value.rgb.r / 255, + green: value.rgb.g / 255, + blue: value.rgb.b / 255, + name: key, + createdAt: dateString, + id: crypto.randomUUID().toUpperCase(), + }; + }), + lock: true, + }; + return JSON.stringify(data, null, 2); +}; + +const generateGimp = (name, palette) => { + const n = Object.keys(palette).length; + const head = `GIMP Palette\n#Palette Name: ${name}\n#Colors: ${n}\n`; + const pad = (str) => str.toString().padStart(3, " "); + const palette = Object.values(palette) + .map((value) => { + const v = [ + pad(value.rgb.r), + pad(value.rgb.g), + pad(value.rgb.b), + value.hex, + ]; + return v.join(" "); + }) + .join("\n"); + return head + palette; +}; + +Object.entries(variants).map(([name, palette]) => { + name = `Catppuccin ${name.charAt(0).toUpperCase() + name.slice(1)}`; + + const sip = generateSip(name, palette); + const gimp = generateGimp(name, palette); + const folders = ["sip", "gimp"]; + folders.map((folder) => { + fs.mkdir(path.join(root, folder), { recursive: true }); + }); + fs.writeFile(path.resolve(root, `sip/${name}.palette`), sip); + fs.writeFile(path.resolve(root, `gimp/${name}.gpl`), gimp); +}); diff --git a/src/scripts/build_sip.mjs b/src/scripts/build_sip.mjs deleted file mode 100644 index 91fbc69..0000000 --- a/src/scripts/build_sip.mjs +++ /dev/null @@ -1,52 +0,0 @@ -import fs from "fs/promises"; -import crypto from "crypto"; -import { variants } from "@catppuccin/palette"; -import url from "url"; -import path from "path"; - -const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); -const dateString = new Date() - .toISOString() - .replace(/T/, " ") - .replace(/\..+/, ""); - -Object.entries(variants).map(([name, palette]) => { - name = `Catppuccin ${name.charAt(0).toUpperCase() + name.slice(1)}`; - - const data = { - cloud: true, - updatedAt: dateString, - sip: { - version: "2.6", - build: "260", - }, - id: crypto.randomUUID().toUpperCase(), - readOnly: false, - createdAt: dateString, - dock: false, - name: name, - index: 1, - originalName: name, - like: false, - colors: Object.entries(palette).map(([key, value]) => { - const hex = palette[key].hex; - const r = parseInt(hex.substring(1, 3), 16) / 255; - const g = parseInt(hex.substring(3, 5), 16) / 255; - const b = parseInt(hex.substring(5, 7), 16) / 255; - - return { - alpha: 1, - red: r, - green: g, - blue: b, - name: key, - createdAt: dateString, - id: crypto.randomUUID().toUpperCase(), - }; - }), - lock: true, - }; - - const outFile = path.resolve(__dirname, `../../sip/${name}.palette`); - fs.writeFile(outFile, JSON.stringify(data, null, 2)); -}); diff --git a/test.js b/test.js deleted file mode 100644 index 9d6eb60..0000000 --- a/test.js +++ /dev/null @@ -1,35 +0,0 @@ -import test from 'ava' -import {variants, labels} from './index.js' - -test('Labels', (t) => { - t.deepEqual(labels.base, { - latte: { - hex: '#eff1f5', - rgb: 'rgb(239, 241, 245)', - hsl: 'hsl(220, 23%, 95%)', - }, - frappe: { - hex: '#303446', - rgb: 'rgb(48, 52, 70)', - hsl: 'hsl(229, 19%, 23%)', - }, - macchiato: { - hex: '#24273a', - rgb: 'rgb(36, 39, 58)', - hsl: 'hsl(232, 23%, 18%)', - }, - mocha: { - hex: '#1e1e2e', - rgb: 'rgb(30, 30, 46)', - hsl: 'hsl(240, 21%, 15%)', - }, - }) -}) - -test('Variants', (t) => { - t.deepEqual(variants.macchiato.rosewater, { - hex: '#f4dbd6', - rgb: 'rgb(244, 219, 214)', - hsl: 'hsl(10, 58%, 90%)', - }) -}) diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..31c886f --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + minify: false, + target: "node16", + clean: true, + format: ["cjs", "esm"], +});