Color::Calc::WWW(3pm)
π NAME π
Color::Calc::WWW β simple calculations with colors for the WWW β¨ like, you give it a color, it gives you more colors, and they all play nice together π
(It lives in the perl manual as Color::Calc::WWW(3pm), user-contributed perl documentation, iykyk π )
π¦ SYNOPSIS π¦
use Color::Calc::WWW;
my $background = 'green';
print 'background: ', color($background),';';
print 'border-top: solid 1px ', color_light($background),';';
print 'border-bottom: solid 1px ', color_dark($background),';';
print 'color: ', color_contrast_bw($background),';';
okay so look at that. one green. and suddenly you have a whole lewk π₯
πΈ DESCRIPTION πΈ
The Color::Calc::WWW module implements simple calculations with RGB colors for the World Wide Web. bestie, this is how you build a whole color scheme out of like two colors and zero design degree π
This module is nearly identical to using the following:
use Color::Calc('ColorScheme' => 'WWW', 'OutputFormat' => 'html');
However β and this is the part that's lowkey iconic β this module also makes the functions available when not imported:
use Color::Calc::WWW(); # don't import
Color::Calc::WWW::color('F00');
so you can be all "no thanks I'll call them myself, fully-qualified, main character energy" π
β¨ USAGE β¨
By default, all functions are imported. all of them. no extra work, they just show up π«Ά
All functions recognize all HTML color keywords (through Graphics::ColorNames::WWW) and output the results in WWW-compatible formats, i.e. as one of the 16 basic HTML keywords (see Graphics::ColorNames::WWW) or as #RRGGBB.
color,color_mix, ... β SeeColor::Calcfor a list of available calculation functions. (yes the list is over there, go look, it's giving comprehensive π)
π NOTE π
literally nothing here. an empty NOTE section. a void. a vibe. we respect it π
π AUTHOR π
Claus Faerber <CFAERBER@cpan.org> π
π LICENSE π
Copyright 2004-2010 Claus Faerber.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, legally speaking β
and that's the whole page bestie!! brought to you by perl v5.36.0, dated 2023-02-25, filed under Color::Calc::WWW(3pm) π¦ go make something cute with it, periodt π
π¦ where this page comes from
- debian trixie: libcolor-calc-perl 1.074-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcolor-calc-perl 1.074-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcolor-calc-perl 1.074-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcolor-calc-perl 1.074-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms