There is an ongoing outage on the primary CPAN mirror. It is possible to work around the issue by using MetaCPAN as a mirror.

colorize

my $output = $self->colorize($input);

colors a line of input