-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
60 lines (40 loc) · 1.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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.
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
dzen <https://github.com/robm/dzen>
dzen2 <https://github.com/minos-org/dzen2>
AUTHOR
Magnus Woldrich
CPAN ID: WOLDRICH
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.