For the full range of RGB colors in the console, you can also
use Terminal::ANSI. For example:

  use Terminal::ANSI::OO :t;

    say t.color('#dd00dd') ~ 'light purple' ~ t.text-reset;
    say t.color('#7e1e9c') ~ 'dark purple' ~ t.text-reset;
    say t.color(255,100,255) ~ 'another light purple' ~ t.text-reset;

  or to set the background color

    say t.bg-color('#dd00dd') ~ 'purple background' ~ t.text-reset;

Brian

Reply via email to