Task

Display a word in various colours on the terminal.

The system palette, or colours such as Red, Green, Blue, Magenta, Cyan, and Yellow can be used.



Optionally demonstrate:

 How the system should determine if the terminal supports colour
 Setting of the background colour
 How to cause blinking or flashing (if supported by the terminal)


program Colorizer;
 
uses CRT;
 
const SampleText = 'Lorem ipsum dolor sit amet';
 
var fg, bg: 0..15;
 
begin
    ClrScr;
    for fg := 0 to 7 do begin
        bg := 15 - fg;
        TextBackground(bg);
        TextColor(fg);
        writeln(SampleText)
    end;
    TextBackground(White);
    TextColor(Black);
end.