about summary refs log tree commit diff stats
path: root/tests/functionaltests/test_receipts.c
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2019-12-03 20:51:51 +0100
committerAurelien Aptel <aaptel@suse.com>2019-12-03 21:10:39 +0100
commit4a672bda2202f66c616a7b326c5a497b67ade8fd (patch)
treef9db673806203d89a7bc78dfb8e6872dafd99909 /tests/functionaltests/test_receipts.c
parent15064d97397779d172c993100a763f48a52238e1 (diff)
downloadprofani-tty-4a672bda2202f66c616a7b326c5a497b67ade8fd.tar.gz
XEP-0392: color: implement color hashing
* add the HSL values of each of the 256 terminal colors
* add color_pair_cache_hash_str()
* move common code to _color_pair_cache_get() helper func

after hashing a string to a color, return the closest matching
terminal color using euclidian distance of the HSL diff vector (this
method was found empirically and seems to work well enough...)
Diffstat (limited to 'tests/functionaltests/test_receipts.c')
0 files changed, 0 insertions, 0 deletions