add colortest and tweak foreground/background in light mode

This commit is contained in:
Fernando Schauenburg 2019-02-27 21:05:44 +01:00
parent d00e1d6787
commit 820ae0ed40

View file

@ -187,8 +187,8 @@ bashrc_customize_terminal_colors() {
local background="$Base03_RGB"
local foreground="$Base1_RGB"
else
local background="$Base2_RGB"
local foreground="$Base02_RGB"
local background="$Base3_RGB"
local foreground="$Base01_RGB"
fi
if [ -n "$ITERM_SESSION_ID" ]; then
@ -269,6 +269,18 @@ solarized() {
done
}
# Print all 256 colors
colortest() {
for i in $(seq 0 15); do
for j in $(seq 0 15); do
local n=$(( 16 * $i + $j ))
printf "\x1b[48;5;${n}m %3d \033[0m" $n
done
printf '\n'
done
printf '\033[0m'
}
# Combined mkdir and cd
mkcd() { mkdir -p -- "$1" && cd -P -- "$1"; }