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)


with Ada.Text_Io;
 
with Ansi;
 
procedure Coloured  is
   use Ada.Text_Io;
   subtype Ansi_Colors is Ansi.Colors
     range Ansi.Black .. Ansi.Colors'Last;  -- Avoid default
begin
   for Fg_Color in Ansi_Colors loop
      Put ("Rosetta ");
      Put (Ansi.Foreground (Fg_Color));
      for Bg_Color in Ansi_Colors loop
         Put (Ansi.Background (Bg_Color));
         Put ("Code");
      end loop;
      Put (Ansi.Reset);
      New_Line;
   end loop;
end Coloured;