From 8ad4ead59fa11c8c9fe784373feaf2fd36f6f875 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 19 Mar 2022 06:59:38 +0100 Subject: [PATCH] Add true colour to ANSI colour function --- .config/zsh/functions/ansi-colours | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/zsh/functions/ansi-colours b/.config/zsh/functions/ansi-colours index 8625313..e2c3178 100644 --- a/.config/zsh/functions/ansi-colours +++ b/.config/zsh/functions/ansi-colours @@ -1,5 +1,6 @@ #!/usr/bin/env zsh # Prints ANSI colours along with their escape codes. +# https://tintin.mudhalla.net/info/256color/ print "\e[1;97mClassic colours:\e[0m" @@ -27,4 +28,8 @@ for n in {0..255}; do done print -c ${colours} -print "\n\e[1;97m256 colour background:\e[0m 48 instead of 38 \e[1;97mReset: \e[0m\\\e[0m" +print "\n\e[1;97m256 colour background:\e[0m 48 instead of 38" + +print "\e[1;97mTrue colour:\e[0m \\\e[38;2;\e[0;31mR\e[0m;\e[0;32mG\e[0m;\e[0;34mB\e[0mm and \\\e[48;2;\e[0;41mR\e[0m;\e[0;42mG\e[0m;\e[0;44mB\e[0mm" + +print "\e[1;97mReset: \e[0m\\\e[0m"