Re: print in purple question

[email protected] (Brian Duggan)
Newsgroups perl.perl6.users
Message-ID <Zy9fq_CLXeDvQGz6@haraka>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.