This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copy and paste to /sbin/remove-desktop | |
#!/bin/sh | |
PREFIX= | |
: ${LIBDIR=$PREFIX/lib} | |
. "$LIBDIR/libalpine.sh" | |
usage() { | |
cat <<-__EOF__ |
It's a common confusion about terminal colours... Actually we have this:
- plain ascii
- ansi escape codes (16 colour codes with bold/italic and background)
- 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
- 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
(Also see [remarkable][], the markdown parser created by the author of this cheatsheet)