tests: reuse one of 32 TrueColors over the terminal

terminology-1.7
Boris Faure 2 years ago
parent 1bd27081c3
commit 9316652127
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
  1. 1
      tests/tests.results
  2. 118
      tests/true_color_cache_reuse.sh

@ -136,3 +136,4 @@ selection_scrolls_down.sh c0fc70e8d865236d66edc7ad13af4dbe
selection_box_scrolls_down.sh c0fc70e8d865236d66edc7ad13af4dbe
esc_term_name_version.sh 4498d5f9f7d827bcd46774063510c712
true_color_cache_thrashing.sh 34df56d44685b91eed2802167f48f3c4
true_color_cache_reuse.sh ab8e074716821d8c213a01729a57f867

@ -0,0 +1,118 @@
#!/bin/sh
# fill space with E
printf '\033[69;1;1;25;80\044x'
#set color
printf '\033[46;31;3m'
# move
printf '\033[H'
n=42
for _ in $(seq $((80*24))); do
# my take on a weird LCG
n=$(((n * 37 + 599)))
if [ "$n" -lt 0 ]; then
n=$((n *= -1))
fi
v=$((n % 32))
case "$v" in
"0")
printf "\033[48;2;73;10;61m " #490A3D
;;
"1")
printf "\033[48;2;189;80;21m " #BD1550
;;
"2")
printf "\033[48;2;233;127;2m " #E97F02
;;
"3")
printf "\033[48;2;248;202;0m " #F8CA00
;;
"4")
printf "\033[48;2;138;155;15m " #8A9B0F
;;
"5")
printf "\033[48;2;105;210;231m " #69D2E7
;;
"6")
printf "\033[48;2;167;219;216m " #A7DBD8
;;
"7")
printf "\033[48;2;224;228;204m " #E0E4CC
;;
"8")
printf "\033[48;2;243;134;148m " #F38630
;;
"9")
printf "\033[48;2;250;105;0m " #FA6900
;;
"10")
printf "\033[48;2;62;65;71m " #3E4147
;;
"11")
printf "\033[48;2;255;254;223m " #FFFEDF
;;
"12")
printf "\033[48;2;223;186;105m " #DFBA69
;;
"13")
printf "\033[48;2;90;46;46m " #5A2E2E
;;
"14")
printf "\033[48;2;42;44;49m " #2A2C31
;;
"15")
printf "\033[48;2;250;208;137m " #FAD089
;;
"16")
printf "\033[48;2;255;156;91m " #FF9C5B
;;
"17")
printf "\033[48;2;245;99;74m " #F5634A
;;
"18")
printf "\033[48;2;237;48;60m " #ED303C
;;
"19")
printf "\033[48;2;59;129;131m " #3B8183
;;
"20")
printf "\033[48;2;237;235;230m " #EDEBE6
;;
"21")
printf "\033[48;2;214;225;199m " #D6E1C7
;;
"22")
printf "\033[48;2;148;199;182m " #94C7B6
;;
"23")
printf "\033[48;2;64;59;51m " #403B33
;;
"24")
printf "\033[48;2;211;100;59m " #D3643B
;;
"25")
printf "\033[48;2;96;120;72m " #607848
;;
"26")
printf "\033[48;2;120;144;72m " #789048
;;
"27")
printf "\033[48;2;192;216;96m " #C0D860
;;
"28")
printf "\033[48;2;240;240;216m " #F0F0D8
;;
"29")
printf "\033[48;2;96;72;72m " #604848
;;
"30")
printf "\033[48;2;255;229;69m " #FFE545
;;
"31")
printf "\033[48;2;240;35;17m " #F02311
;;
esac
done
Loading…
Cancel
Save