- commit
- d6247dba1bf4a61a8d903eeddf8b71f1803c0b0c
- parent
- bb74ffc79f614df93ca93712034b4c5416fc09a5
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-11-17 11:21
fix ORDER
Diffstat
| M | xiwal/scheme.py | 4 | ++-- |
1 files changed, 2 insertions, 2 deletions
diff --git a/xiwal/scheme.py b/xiwal/scheme.py
@@ -36,7 +36,7 @@ def permutate(a, n): 36 36 37 37 @functools.lru_cache(maxsize=32) 38 38 def distance(color, i):39 -1 hue = math.pi / 3 * i + OFFSET-1 39 hue = math.pi / 3 * ORDER[i] + OFFSET 40 40 d = abs(color[2] - hue) 41 41 if d > math.pi: 42 42 d = 2 * math.pi - d @@ -54,7 +54,7 @@ def score(colors): 54 54 sum_chroma = 0 55 55 56 56 for i, color in enumerate(colors):57 -1 score, chroma = distance(color, ORDER[i])-1 57 score, chroma = distance(color, i) 58 58 sum_score += score 59 59 sum_chroma += chroma 60 60