16 Colors in TTY

This commit is contained in:
Linus Dierheimer
2022-03-14 17:31:16 +01:00
parent 00fdb8a0c4
commit 07a685bb9a
+12 -5
View File
@@ -4,15 +4,22 @@ void ffPrintColors(FFinstance* instance)
{
ffPrintLogoLine(instance);
// 4%d: Set the background color
// 3%d: Set the foreground color
for(uint8_t i = 0; i < 8; i++)
printf("\033[4%dm ", i);
printf("\033[4%d;3%dm███", i, i);
puts("\033[0m");
puts(FASTFETCH_TEXT_MODIFIER_RESET);
ffPrintLogoLine(instance);
for(uint8_t i = 8; i < 16; i++)
printf("\033[48;5;%dm ", i);
// 1: Set everything to bolt. This causes normal colors on some systems to be bright.
// 4%d: Set the backgound to the not bright color
// 3%d: Set the foreground to the not bright color
// 10%d: Set the background to the bright color
// 9%d: Set the foreground to the bright color
for(uint8_t i = 0; i < 8; i++)
printf("\033[1;4%d;3%d;10%d;9%dm███", i, i, i, i);
puts("\033[0m");
puts(FASTFETCH_TEXT_MODIFIER_RESET);
}