App-ANSIColorUtils
view release on metacpan or search on metacpan
lib/App/ANSIColorUtils.pm view on Meta::CPAN
my $ansifg = Color::ANSI::Util::ansifg($colorcode);
my $ansibg = Color::ANSI::Util::ansibg($colorcode);
push @rows, {
name => $colorname,
rgb_code => $colorcode,
ansi_fg_code => Data::Dmp::dmp($ansifg),
ansi_bg_code => Data::Dmp::dmp($ansibg),
fg =>
$ansifg . "This is text with foreground color $colorname (#$colorcode)" . Color::ANSI::Util::ansi_reset(1) . "\n" .
$ansifg . "\e[1m" . "This is text with foreground color $colorname (#$colorcode) + BOLD" . Color::ANSI::Util::ansi_reset(1) . "\n",
bg => $ansibg . Color::ANSI::Util::ansifg(Color::RGB::Util::rgb_is_light($colorcode) ? "000000":"ffffff") . "This is text with background color $colorname (#$colorcode)" . Color::ANSI::Util::ansi_reset(1),
};
}
[200, "OK", \@rows];
}
$SPEC{show_colors_from_scheme} = {
v => 1.1,
summary => 'Show colors from a Graphics::ColorNames scheme',
args => {
scheme => {
script/rgb-to-ansi-bg-code view on Meta::CPAN
my $cmdline = Perinci::CmdLine::Any->new(
url => "/Color/ANSI/Util/rgb_to_ansi_bg_code",
program_name => "rgb-to-ansi-bg-code",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Convert RGB to ANSI color escape sequence to change background color
# PODNAME: rgb-to-ansi-bg-code
__END__
=pod
=encoding UTF-8
=head1 NAME
rgb-to-ansi-bg-code - Convert RGB to ANSI color escape sequence to change background color
=head1 VERSION
This document describes version 0.011 of rgb-to-ansi-bg-code (from Perl distribution App-ANSIColorUtils), released on 2025-03-18.
=head1 SYNOPSIS
B<rgb-to-ansi-bg-code> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<rgb-to-ansi-bg-code> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
script/rgb-to-ansi16-bg-code view on Meta::CPAN
my $cmdline = Perinci::CmdLine::Any->new(
url => "/Color/ANSI/Util/rgb_to_ansi16_bg_code",
program_name => "rgb-to-ansi16-bg-code",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Convert RGB to ANSI-16 color escape sequence to change background color
# PODNAME: rgb-to-ansi16-bg-code
__END__
=pod
=encoding UTF-8
=head1 NAME
rgb-to-ansi16-bg-code - Convert RGB to ANSI-16 color escape sequence to change background color
=head1 VERSION
This document describes version 0.011 of rgb-to-ansi16-bg-code (from Perl distribution App-ANSIColorUtils), released on 2025-03-18.
=head1 SYNOPSIS
B<rgb-to-ansi16-bg-code> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<rgb-to-ansi16-bg-code> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
script/rgb-to-ansi24b-bg-code view on Meta::CPAN
my $cmdline = Perinci::CmdLine::Any->new(
url => "/Color/ANSI/Util/rgb_to_ansi24b_bg_code",
program_name => "rgb-to-ansi24b-bg-code",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Convert RGB to ANSI 24bit-color escape sequence to change background color
# PODNAME: rgb-to-ansi24b-bg-code
__END__
=pod
=encoding UTF-8
=head1 NAME
rgb-to-ansi24b-bg-code - Convert RGB to ANSI 24bit-color escape sequence to change background color
=head1 VERSION
This document describes version 0.011 of rgb-to-ansi24b-bg-code (from Perl distribution App-ANSIColorUtils), released on 2025-03-18.
=head1 SYNOPSIS
B<rgb-to-ansi24b-bg-code> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<rgb-to-ansi24b-bg-code> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
script/rgb-to-ansi256-bg-code view on Meta::CPAN
my $cmdline = Perinci::CmdLine::Any->new(
url => "/Color/ANSI/Util/rgb_to_ansi256_bg_code",
program_name => "rgb-to-ansi256-bg-code",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Convert RGB to ANSI-256 color escape sequence to change background color
# PODNAME: rgb-to-ansi256-bg-code
__END__
=pod
=encoding UTF-8
=head1 NAME
rgb-to-ansi256-bg-code - Convert RGB to ANSI-256 color escape sequence to change background color
=head1 VERSION
This document describes version 0.011 of rgb-to-ansi256-bg-code (from Perl distribution App-ANSIColorUtils), released on 2025-03-18.
=head1 SYNOPSIS
B<rgb-to-ansi256-bg-code> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<rgb-to-ansi256-bg-code> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
( run in 0.535 second using v1.01-cache-2.11-cpan-d8267643d1d )