Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trapd00r/term-extendedcolor-dzen
Color input and add dzen compatible attributes
https://github.com/trapd00r/term-extendedcolor-dzen
colors dzen dzen2
Last synced: about 2 months ago
JSON representation
Color input and add dzen compatible attributes
- Host: GitHub
- URL: https://github.com/trapd00r/term-extendedcolor-dzen
- Owner: trapd00r
- Created: 2019-01-29T10:04:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T07:43:25.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T02:15:34.369Z (8 months ago)
- Topics: colors, dzen, dzen2
- Language: Perl
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
NAME
Term::ExtendedColor::Dzen - Color input and add dzen(2) compatible
attributesSYNOPSIS
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
dzendzen2
AUTHOR
Magnus Woldrich
CPAN ID: WOLDRICH
[email protected]
http://japh.seCopyright 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.