diff --git a/flake.nix b/flake.nix
index 72e87fd..bcb993d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,8 +28,10 @@
{
# Shell
default = pkgs.mkShell {
- packages = [ ]
- ++ project-config.packages;
+ packages = [
+ pkgs.deno
+ ]
+ ++ project-config.packages;
shellHook = project-config.shellHook;
};
diff --git a/src/cli.ts b/src/cli.ts
new file mode 100644
index 0000000..ddfe1e2
--- /dev/null
+++ b/src/cli.ts
@@ -0,0 +1,38 @@
+// We need an empty export for top-level await.
+export {};
+
+// Start with the basic CSS header.
+let lines: string[] = [":root {"];
+
+// We have ten colors, with 0 being the base hue and the others being evenly
+// rotated around the color wheel.
+for (let color = 0; color < 10; color++) {
+ // Figure out the rotation.
+ const rotation = color * 36; // 1/10th of a circle
+
+ // For each hue, we have ten levels of brightness ranging from very dark
+ // to very light.
+ for (let brightness = 0; brightness < 10; brightness++) {
+ // We use a standard code (--color-cXbY) for our codes.
+ const code = `--color-c${color}b${brightness}`;
+
+ // Figure out the ramps we are using for brighteness.
+ const l = brightness * 11;
+ const s = 50 - brightness * 5;
+
+ // Write out the CSS.
+ lines.push(
+ ` ${code}: lch(${l.toFixed(1)} ${s.toFixed(
+ 1,
+ )} calc(var(--color-hue) + ${rotation}));`,
+ );
+ }
+}
+
+// Finish up the lines.
+lines.push("}");
+
+// Write out the files.
+const text = new TextEncoder().encode(lines.join("\n"));
+
+await Deno.writeFile("src/colors.css", text, { mode: 0o644 });
diff --git a/src/colors.css b/src/colors.css
new file mode 100644
index 0000000..f053e54
--- /dev/null
+++ b/src/colors.css
@@ -0,0 +1,102 @@
+:root {
+ --color-c0b0: lch(0 50 calc(var(--color-hue) + 0));
+ --color-c0b1: lch(11 45 calc(var(--color-hue) + 0));
+ --color-c0b2: lch(22 40 calc(var(--color-hue) + 0));
+ --color-c0b3: lch(33 35 calc(var(--color-hue) + 0));
+ --color-c0b4: lch(44 30 calc(var(--color-hue) + 0));
+ --color-c0b5: lch(55 25 calc(var(--color-hue) + 0));
+ --color-c0b6: lch(66 20 calc(var(--color-hue) + 0));
+ --color-c0b7: lch(77 15 calc(var(--color-hue) + 0));
+ --color-c0b8: lch(88 10 calc(var(--color-hue) + 0));
+ --color-c0b9: lch(99 5 calc(var(--color-hue) + 0));
+ --color-c1b0: lch(0 50 calc(var(--color-hue) + 36));
+ --color-c1b1: lch(11 45 calc(var(--color-hue) + 36));
+ --color-c1b2: lch(22 40 calc(var(--color-hue) + 36));
+ --color-c1b3: lch(33 35 calc(var(--color-hue) + 36));
+ --color-c1b4: lch(44 30 calc(var(--color-hue) + 36));
+ --color-c1b5: lch(55 25 calc(var(--color-hue) + 36));
+ --color-c1b6: lch(66 20 calc(var(--color-hue) + 36));
+ --color-c1b7: lch(77 15 calc(var(--color-hue) + 36));
+ --color-c1b8: lch(88 10 calc(var(--color-hue) + 36));
+ --color-c1b9: lch(99 5 calc(var(--color-hue) + 36));
+ --color-c2b0: lch(0 50 calc(var(--color-hue) + 72));
+ --color-c2b1: lch(11 45 calc(var(--color-hue) + 72));
+ --color-c2b2: lch(22 40 calc(var(--color-hue) + 72));
+ --color-c2b3: lch(33 35 calc(var(--color-hue) + 72));
+ --color-c2b4: lch(44 30 calc(var(--color-hue) + 72));
+ --color-c2b5: lch(55 25 calc(var(--color-hue) + 72));
+ --color-c2b6: lch(66 20 calc(var(--color-hue) + 72));
+ --color-c2b7: lch(77 15 calc(var(--color-hue) + 72));
+ --color-c2b8: lch(88 10 calc(var(--color-hue) + 72));
+ --color-c2b9: lch(99 5 calc(var(--color-hue) + 72));
+ --color-c3b0: lch(0 50 calc(var(--color-hue) + 108));
+ --color-c3b1: lch(11 45 calc(var(--color-hue) + 108));
+ --color-c3b2: lch(22 40 calc(var(--color-hue) + 108));
+ --color-c3b3: lch(33 35 calc(var(--color-hue) + 108));
+ --color-c3b4: lch(44 30 calc(var(--color-hue) + 108));
+ --color-c3b5: lch(55 25 calc(var(--color-hue) + 108));
+ --color-c3b6: lch(66 20 calc(var(--color-hue) + 108));
+ --color-c3b7: lch(77 15 calc(var(--color-hue) + 108));
+ --color-c3b8: lch(88 10 calc(var(--color-hue) + 108));
+ --color-c3b9: lch(99 5 calc(var(--color-hue) + 108));
+ --color-c4b0: lch(0 50 calc(var(--color-hue) + 144));
+ --color-c4b1: lch(11 45 calc(var(--color-hue) + 144));
+ --color-c4b2: lch(22 40 calc(var(--color-hue) + 144));
+ --color-c4b3: lch(33 35 calc(var(--color-hue) + 144));
+ --color-c4b4: lch(44 30 calc(var(--color-hue) + 144));
+ --color-c4b5: lch(55 25 calc(var(--color-hue) + 144));
+ --color-c4b6: lch(66 20 calc(var(--color-hue) + 144));
+ --color-c4b7: lch(77 15 calc(var(--color-hue) + 144));
+ --color-c4b8: lch(88 10 calc(var(--color-hue) + 144));
+ --color-c4b9: lch(99 5 calc(var(--color-hue) + 144));
+ --color-c5b0: lch(0 50 calc(var(--color-hue) + 180));
+ --color-c5b1: lch(11 45 calc(var(--color-hue) + 180));
+ --color-c5b2: lch(22 40 calc(var(--color-hue) + 180));
+ --color-c5b3: lch(33 35 calc(var(--color-hue) + 180));
+ --color-c5b4: lch(44 30 calc(var(--color-hue) + 180));
+ --color-c5b5: lch(55 25 calc(var(--color-hue) + 180));
+ --color-c5b6: lch(66 20 calc(var(--color-hue) + 180));
+ --color-c5b7: lch(77 15 calc(var(--color-hue) + 180));
+ --color-c5b8: lch(88 10 calc(var(--color-hue) + 180));
+ --color-c5b9: lch(99 5 calc(var(--color-hue) + 180));
+ --color-c6b0: lch(0 50 calc(var(--color-hue) + 216));
+ --color-c6b1: lch(11 45 calc(var(--color-hue) + 216));
+ --color-c6b2: lch(22 40 calc(var(--color-hue) + 216));
+ --color-c6b3: lch(33 35 calc(var(--color-hue) + 216));
+ --color-c6b4: lch(44 30 calc(var(--color-hue) + 216));
+ --color-c6b5: lch(55 25 calc(var(--color-hue) + 216));
+ --color-c6b6: lch(66 20 calc(var(--color-hue) + 216));
+ --color-c6b7: lch(77 15 calc(var(--color-hue) + 216));
+ --color-c6b8: lch(88 10 calc(var(--color-hue) + 216));
+ --color-c6b9: lch(99 5 calc(var(--color-hue) + 216));
+ --color-c7b0: lch(0 50 calc(var(--color-hue) + 252));
+ --color-c7b1: lch(11 45 calc(var(--color-hue) + 252));
+ --color-c7b2: lch(22 40 calc(var(--color-hue) + 252));
+ --color-c7b3: lch(33 35 calc(var(--color-hue) + 252));
+ --color-c7b4: lch(44 30 calc(var(--color-hue) + 252));
+ --color-c7b5: lch(55 25 calc(var(--color-hue) + 252));
+ --color-c7b6: lch(66 20 calc(var(--color-hue) + 252));
+ --color-c7b7: lch(77 15 calc(var(--color-hue) + 252));
+ --color-c7b8: lch(88 10 calc(var(--color-hue) + 252));
+ --color-c7b9: lch(99 5 calc(var(--color-hue) + 252));
+ --color-c8b0: lch(0 50 calc(var(--color-hue) + 288));
+ --color-c8b1: lch(11 45 calc(var(--color-hue) + 288));
+ --color-c8b2: lch(22 40 calc(var(--color-hue) + 288));
+ --color-c8b3: lch(33 35 calc(var(--color-hue) + 288));
+ --color-c8b4: lch(44 30 calc(var(--color-hue) + 288));
+ --color-c8b5: lch(55 25 calc(var(--color-hue) + 288));
+ --color-c8b6: lch(66 20 calc(var(--color-hue) + 288));
+ --color-c8b7: lch(77 15 calc(var(--color-hue) + 288));
+ --color-c8b8: lch(88 10 calc(var(--color-hue) + 288));
+ --color-c8b9: lch(99 5 calc(var(--color-hue) + 288));
+ --color-c9b0: lch(0 50 calc(var(--color-hue) + 324));
+ --color-c9b1: lch(11 45 calc(var(--color-hue) + 324));
+ --color-c9b2: lch(22 40 calc(var(--color-hue) + 324));
+ --color-c9b3: lch(33 35 calc(var(--color-hue) + 324));
+ --color-c9b4: lch(44 30 calc(var(--color-hue) + 324));
+ --color-c9b5: lch(55 25 calc(var(--color-hue) + 324));
+ --color-c9b6: lch(66 20 calc(var(--color-hue) + 324));
+ --color-c9b7: lch(77 15 calc(var(--color-hue) + 324));
+ --color-c9b8: lch(88 10 calc(var(--color-hue) + 324));
+ --color-c9b9: lch(99 5 calc(var(--color-hue) + 324));
+}
diff --git a/src/index.html b/src/index.html
new file mode 100644
index 0000000..180e73f
--- /dev/null
+++ b/src/index.html
@@ -0,0 +1,1152 @@
+
+
+
+ Ideas
+
+
+
+
+
+ Choose Your Favorite Color
+
+
+
+ Color Grid
+
+
+
+ |
+ c0 |
+ c1 |
+ c2 |
+ c3 |
+ c4 |
+ c5 |
+ c6 |
+ c7 |
+ c8 |
+ c9 |
+
+
+ b0 |
+ c0b0 |
+ c1b0 |
+ c2b0 |
+ c3b0 |
+ c4b0 |
+ c5b0 |
+ c6b0 |
+ c7b0 |
+ c8b0 |
+ c9b0 |
+
+
+ b1 |
+ c0b1 |
+ c1b1 |
+ c2b1 |
+ c3b1 |
+ c4b1 |
+ c5b1 |
+ c6b1 |
+ c7b1 |
+ c8b1 |
+ c9b1 |
+
+
+ b2 |
+ c0b2 |
+ c1b2 |
+ c2b2 |
+ c3b2 |
+ c4b2 |
+ c5b2 |
+ c6b2 |
+ c7b2 |
+ c8b2 |
+ c9b2 |
+
+
+ b3 |
+ c0b3 |
+ c1b3 |
+ c2b3 |
+ c3b3 |
+ c4b3 |
+ c5b3 |
+ c6b3 |
+ c7b3 |
+ c8b3 |
+ c9b3 |
+
+
+ b4 |
+ c0b4 |
+ c1b4 |
+ c2b4 |
+ c3b4 |
+ c4b4 |
+ c5b4 |
+ c6b4 |
+ c7b4 |
+ c8b4 |
+ c9b4 |
+
+
+ b5 |
+ c0b5 |
+ c1b5 |
+ c2b5 |
+ c3b5 |
+ c4b5 |
+ c5b5 |
+ c6b5 |
+ c7b5 |
+ c8b5 |
+ c9b5 |
+
+
+ b6 |
+ c0b6 |
+ c1b6 |
+ c2b6 |
+ c3b6 |
+ c4b6 |
+ c5b6 |
+ c6b6 |
+ c7b6 |
+ c8b6 |
+ c9b6 |
+
+
+ b7 |
+ c0b7 |
+ c1b7 |
+ c2b7 |
+ c3b7 |
+ c4b7 |
+ c5b7 |
+ c6b7 |
+ c7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+ c8b0 |
+ c9b0 |
+
+
+ +7 |
+ c0b0 |
+
+ c1b0 |
+ c2b0 |
+ c3b0 |
+ c4b0 |
+ c5b0 |
+ c6b0 |
+ c7b0 |
+ c8b0 |
+ c9b0 |
+
+
+ +9 |
+ c0b0 |
+
+ c1b0 |
+ c2b0 |
+ c3b0 |
+ c4b0 |
+ c5b0 |
+ c6b0 |
+ c7b0 |
+ c8b0 |
+ c9b0 |
+
+
+ -3 |
+ c0b0 |
+
+ c1b0 |
+ c2b0 |
+ c3b0 |
+ c4b0 |
+ c5b0 |
+ c6b0 |
+ c7b0 |
+ c8b0 |
+ c9b0 |
+
+
+ -7 |
+ c0b0 |
+
+ c1b0 |
+ c2b0 |
+ c3b0 |
+ c4b0 |
+ c5b0 |
+ c6b0 |
+ c7b0 |
+ c8b0 |
+ c9b0 |
+
+
+ -9 |
+ c0b0 |
+
+ c1b0 |
+ c2b0 |
+ c3b0 |
+ c4b0 |
+ c5b0 |
+ c6b0 |
+ c7b0 |
+ c8b0 |
+ c9b0 |
+
+
+
+
+
diff --git a/src/style.css b/src/style.css
new file mode 100644
index 0000000..dee2322
--- /dev/null
+++ b/src/style.css
@@ -0,0 +1,2 @@
+@import url("./colors.css");
+@import url("./theme.css");
diff --git a/src/theme.css b/src/theme.css
new file mode 100644
index 0000000..03e8433
--- /dev/null
+++ b/src/theme.css
@@ -0,0 +1,48 @@
+:root {
+ background-color: var(--color-c0b9);
+ color: var(--color-c0b1);
+}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ background-color: var(--color-c0b9);
+ color: var(--color-c0b1);
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ background-color: var(--color-c0b0);
+ color: var(--color-c0b8);
+ }
+}
+
+[data-prefers-color-scheme="light"] {
+ background-color: var(--color-c0b9);
+ color: var(--color-c0b1);
+}
+
+[data-prefers-color-scheme="light"][data-prefers-contrast="more"] {
+ background-color: var(--color-c0b9);
+ color: var(--color-c0b0);
+}
+
+[data-prefers-color-scheme="light"][data-prefers-contrast="less"] {
+ background-color: var(--color-c0b9);
+ color: var(--color-c0b2);
+}
+
+[data-prefers-color-scheme="dark"] {
+ background-color: var(--color-c0b0);
+ color: var(--color-c0b8);
+}
+
+[data-prefers-color-scheme="dark"][data-prefers-contrast="more"] {
+ background-color: var(--color-c0b0);
+ color: var(--color-c0b9);
+}
+
+[data-prefers-color-scheme="dark"][data-prefers-contrast="less"] {
+ background-color: var(--color-c0b0);
+ color: var(--color-c0b7);
+}