1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00
alacritty/scripts/fg-bg.sh
Christian Duerr d387ebe1d7
Add hidden escape sequence
This adds support for the `hidden` escape sequence `\e[8m`, which will
render the text as invisible.

This has also raised a few questions about the rendering of foreground
and background colors and their interaction with the different escape
sequences. Previously, Alacritty has oriented itself after URxvt, which
has some strange and unexpected behavior.

The new implementation of color inversion is modeled after XTerm, which
has a consistent pattern of always inverting the foreground and
background colors. This should hopefully lead to less confusion for the
user and a more consistent behavior.

A full matrix showcasing the new way Alacritty inverses text can be
found here:
https://i.imgur.com/d1XavG7.png

This fixes #1454 and fixes #1455.
2018-09-19 19:18:51 +00:00

53 lines
2.9 KiB
Bash
Executable file

#!/bin/bash
printf "Fg=Black Bg=Black \e[30;40mTEST\e[m\n"
printf "Fg=Black Bg=White \e[30;107mTEST\e[m\n"
printf "Fg=Black Bg=Red \e[30;41mTEST\e[m\n"
printf "Fg=Black Bg=BG \e[30;49mTEST\e[m\n"
printf "Fg=White Bg=Black \e[97;40mTEST\e[m\n"
printf "Fg=White Bg=White \e[97;107mTEST\e[m\n"
printf "Fg=White Bg=Red \e[97;41mTEST\e[m\n"
printf "Fg=White Bg=BG \e[97;49mTEST\e[m\n"
printf "Fg=Red Bg=Black \e[31;40mTEST\e[m\n"
printf "Fg=Red Bg=White \e[31;107mTEST\e[m\n"
printf "Fg=Red Bg=Red \e[31;41mTEST\e[m\n"
printf "Fg=Red Bg=BG \e[31;49mTEST\e[m\n"
printf "\n"
printf "Fg=Black Bg=Black Inverse \e[7;30;40mTEST\e[m\n"
printf "Fg=Black Bg=White Inverse \e[7;30;107mTEST\e[m\n"
printf "Fg=Black Bg=Red Inverse \e[7;30;41mTEST\e[m\n"
printf "Fg=Black Bg=BG Inverse \e[7;30;49mTEST\e[m\n"
printf "Fg=White Bg=Black Inverse \e[7;97;40mTEST\e[m\n"
printf "Fg=White Bg=White Inverse \e[7;97;107mTEST\e[m\n"
printf "Fg=White Bg=Red Inverse \e[7;97;41mTEST\e[m\n"
printf "Fg=White Bg=BG Inverse \e[7;97;49mTEST\e[m\n"
printf "Fg=Red Bg=Black Inverse \e[7;31;40mTEST\e[m\n"
printf "Fg=Red Bg=White Inverse \e[7;31;107mTEST\e[m\n"
printf "Fg=Red Bg=Red Inverse \e[7;31;41mTEST\e[m\n"
printf "Fg=Red Bg=BG Inverse \e[7;31;49mTEST\e[m\n"
printf "\n"
printf "Fg=Black Bg=Black Hidden \e[8;30;40mTEST\e[m\n"
printf "Fg=Black Bg=White Hidden \e[8;30;107mTEST\e[m\n"
printf "Fg=Black Bg=Red Hidden \e[8;30;41mTEST\e[m\n"
printf "Fg=Black Bg=BG Hidden \e[8;30;49mTEST\e[m\n"
printf "Fg=White Bg=Black Hidden \e[8;97;40mTEST\e[m\n"
printf "Fg=White Bg=White Hidden \e[8;97;107mTEST\e[m\n"
printf "Fg=White Bg=Red Hidden \e[8;97;41mTEST\e[m\n"
printf "Fg=White Bg=BG Hidden \e[8;97;49mTEST\e[m\n"
printf "Fg=Red Bg=Black Hidden \e[8;31;40mTEST\e[m\n"
printf "Fg=Red Bg=White Hidden \e[8;31;107mTEST\e[m\n"
printf "Fg=Red Bg=Red Hidden \e[8;31;41mTEST\e[m\n"
printf "Fg=Red Bg=BG Hidden \e[8;31;49mTEST\e[m\n"
printf "\n"
printf "Fg=Black Bg=Black Hid+Inv \e[7;8;30;40mTEST\e[m\n"
printf "Fg=Black Bg=White Hid+Inv \e[7;8;30;107mTEST\e[m\n"
printf "Fg=Black Bg=Red Hid+Inv \e[7;8;30;41mTEST\e[m\n"
printf "Fg=Black Bg=BG Hid+Inv \e[7;8;30;49mTEST\e[m\n"
printf "Fg=White Bg=Black Hid+Inv \e[7;8;97;40mTEST\e[m\n"
printf "Fg=White Bg=White Hid+Inv \e[7;8;97;107mTEST\e[m\n"
printf "Fg=White Bg=Red Hid+Inv \e[7;8;97;41mTEST\e[m\n"
printf "Fg=White Bg=BG Hid+Inv \e[7;8;97;49mTEST\e[m\n"
printf "Fg=Red Bg=Black Hid+Inv \e[7;8;31;40mTEST\e[m\n"
printf "Fg=Red Bg=White Hid+Inv \e[7;8;31;107mTEST\e[m\n"
printf "Fg=Red Bg=Red Hid+Inv \e[7;8;31;41mTEST\e[m\n"
printf "Fg=Red Bg=BG Hid+Inv \e[7;8;31;49mTEST\e[m\n"