From b4dd0052ffc60fbd642729a3e05bcadbd6edd6e1 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Tue, 15 Jun 2021 04:35:41 +0200
Subject: degesch: pick colours based on relative luminance
Replaces the inaccurate Rec. 709 luma we used to use before.
This is the first feature here that requires libm, which doesn't
seem to be a particularly great sacrifice.
Moreover, I've rectified that the input isn't linear in sRGB,
and then was even normalized wrong for the luma formula.
---
test-nick-colors | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100755 test-nick-colors
(limited to 'test-nick-colors')
diff --git a/test-nick-colors b/test-nick-colors
new file mode 100755
index 0000000..a09f74a
--- /dev/null
+++ b/test-nick-colors
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Check whether the terminal colours filtered by our algorithm are legible
+export example=$(
+ tcc "-run -lm" - <<-EOF
+ #include