summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/scheme.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/scheme.c b/bin/scheme.c
index 920ebc74..9acb2e31 100644
--- a/bin/scheme.c
+++ b/bin/scheme.c
@@ -175,13 +175,17 @@ static void outputMintty(const struct HSV *hsv, uint len) {
 }
 
 static void outputCSS(const struct HSV *hsv, uint len) {
+	printf(":root {\n");
 	for (uint i = 0; i < len; ++i) {
 		struct RGB rgb = convert(hsv[i]);
+		printf("\t--ansi%u: #" FORMAT_RGB ";\n", i, rgb.r, rgb.g, rgb.b);
+	}
+	printf("}\n");
+	for (uint i = 0; i < len; ++i) {
 		printf(
-			".fg%u { color: #" FORMAT_RGB "; }\n"
-			".bg%u { background-color: #" FORMAT_RGB "; }\n",
-			i, rgb.r, rgb.g, rgb.b,
-			i, rgb.r, rgb.g, rgb.b
+			".fg%u { color: var(--ansi%u); }\n"
+			".bg%u { background-color: var(--ansi%u); }\n",
+			i, i, i, i
 		);
 	}
 }
/hilex/irc.c?id=087dcc0be343494728162eb12e05ad8a42f77f22&follow=1'>Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe