IRC::Toolkit::Colors - IRC color code utilities
my $str = color('red', "red text") ." other text"; if (has_color($str)) { # ... } my $stripped = strip_color($str);
IRC utilities for adding color/formatting codes to a string.
my $code = color('red'); my $str = color('bold') . "bold text" . color() . "normal text"; my $str = color('bold', "bold text");
Add mIRC formatting/color codes to a string.
Valid formatting codes are:
normal bold underline reverse italic
Valid color codes are:
white black blue light_blue cyan green light_green red brown purple orange yellow teal pink gray light_gray
Returns true if the given string contains color or formatting codes.
Strips all color and formatting codes from the string.
Jon Portnoy <avenj@cobaltirc.org>
Much of this code is primarily derived from IRC::Utils, authored by HINRIK & BINGOS.
Licensed under the same terms as Perl.
To install IRC::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IRC::Toolkit
CPAN shell
perl -MCPAN -e shell install IRC::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.