xiwal

Generate terminal color schemes
git clone https://git.ce9e.org/xiwal.git

commit
771079bafa29e4e98c587f7ba14eb78440016c68
parent
544c4ce6733010d84861b3578fc310956a8faf7f
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-11-17 09:52
refine scoring (again)

Diffstat

M xiwal/scheme.py 3 ++-

1 files changed, 2 insertions, 1 deletions


diff --git a/xiwal/scheme.py b/xiwal/scheme.py

@@ -20,7 +20,7 @@ L_DARK = 2, 45, 50, 50, 45, 45, 50, 85
   20    20 L_LIGHT = 20, 60, 70, 80, 60, 60, 75, 100
   21    21 
   22    22 # hue for red reference color
   23    -1 OFFSET = math.pi * 2 / 15
   -1    23 OFFSET = math.pi * 2 / 14
   24    24 
   25    25 ORDER = [0, 2, 1, 4, 5, 3]
   26    26 
@@ -44,6 +44,7 @@ def distance(color, i):
   44    44 	c = color[1]
   45    45 	if i in [0, 1]:
   46    46 		c = max(c, C_RG)
   -1    47 		d += (c - color[1]) / (c + color[1])
   47    48 
   48    49 	return d ** 4 * c, c
   49    50