NAME
Term::ExtendedColor::Dzen - Color input and add dzen(2) compatible attributes
SYNOPSIS
use Term::ExtendedColor::Dzen qw(fgd bgd);
print fgd('#ff0000', 'this is red foreground');
print bgd('#fff00', 'this is yellow background');
print fgd('#000', bgd('#ffffff', 'this is black on white background'));
DESCRIPTION
Term::ExtendedColor::Dzen provides functionality for coloring input data with dzen compatible attributes.
EXPORTS
None by default.
FUNCTIONS
fgd('#fff', $string)
Sets foreground color. When called without arguments, returns the fg reset string. When called with only one argument, sets the color and emits the end color reset string.
my $white_fg = fgd('#fff', 'white foreground');
bgd('#000', $string)
Sets background color. When called without arguments, returns the bg reset string.
my $black_bg = bg('#000', 'black background');
Like fgd()
, but sets background colors.
These two can be combined:
my $str = fgd('#000', bgd('#ffffff', 'this is black on white background'));
which yields the combined string:
^fg(#000)^bg(#fff)this is black on white background^bg()^fg()
SEE ALSO
sdorfehs accepts dzen attributes.
AUTHOR
Magnus Woldrich
CPAN ID: WOLDRICH
m@japh.se
http://japh.se
Copyright 2019- the Term::ExtendedColor::Dzen "AUTHOR" and "CONTRIBUTORS" as listed above.
LICENSE
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.