Skip to content

Commit 07a685b

Browse files
16 Colors in TTY
1 parent 00fdb8a commit 07a685b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/modules/colors.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,22 @@ void ffPrintColors(FFinstance* instance)
44
{
55
ffPrintLogoLine(instance);
66

7+
// 4%d: Set the background color
8+
// 3%d: Set the foreground color
79
for(uint8_t i = 0; i < 8; i++)
8-
printf("\033[4%dm ", i);
10+
printf("\033[4%d;3%dm███", i, i);
911

10-
puts("\033[0m");
12+
puts(FASTFETCH_TEXT_MODIFIER_RESET);
1113

1214
ffPrintLogoLine(instance);
1315

14-
for(uint8_t i = 8; i < 16; i++)
15-
printf("\033[48;5;%dm ", i);
16+
// 1: Set everything to bolt. This causes normal colors on some systems to be bright.
17+
// 4%d: Set the backgound to the not bright color
18+
// 3%d: Set the foreground to the not bright color
19+
// 10%d: Set the background to the bright color
20+
// 9%d: Set the foreground to the bright color
21+
for(uint8_t i = 0; i < 8; i++)
22+
printf("\033[1;4%d;3%d;10%d;9%dm███", i, i, i, i);
1623

17-
puts("\033[0m");
24+
puts(FASTFETCH_TEXT_MODIFIER_RESET);
1825
}

0 commit comments

Comments
 (0)