RosettaCodeData/Task/Terminal-control-Coloured-text/Phix/terminal-control-coloured-text.phix
2017-09-25 22:28:19 +02:00

22 lines
643 B
Text

--
-- demo\rosetta\Coloured_text.exw
-- ================================
--
text_color(GRAY)
bk_color(BLACK)
printf(1,"Background color# 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15\n")
printf(1," -----------------------------------------------\n")
for foreground=0 to 15 do
printf(1,"Foreground color# %02d ",foreground)
for background=0 to 15 do
text_color(foreground)
bk_color(background)
printf(1,"%02d",foreground)
text_color(GRAY)
bk_color(BLACK)
printf(1," ")
end for
printf(1,"\n")
end for
printf(1,"\n\npress enter to exit")
{} = wait_key()