Color::Calc::WWW(3pm)

πŸ“¦
version 1.074 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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, ... β€” See Color::Calc for 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