1Color::Calc::WWW(3) User Contributed Perl Documentation Color::Calc::WWW(3)
2
3
4
6 Color::Calc::WWW - Simple calculations with colors for the WWW.
7
9 use Color::Calc::WWW;
10 my $background = 'green';
11 print 'background: ', color($background),';';
12 print 'border-top: solid 1px ', color_light($background),';';
13 print 'border-bottom: solid 1px ', color_dark($background),';';
14 print 'color: ', color_contrast_bw($background),';';
15
17 The "Color::Calc::WWW" module implements simple calculations with RGB
18 colors for the World Wide Web. This can be used to create a full color
19 scheme from a few colors.
20
21 This module is nearly identical to using the following:
22
23 use Color::Calc('ColorScheme' => 'WWW', 'OutputFormat' => 'html');
24
25 However, this module also makes the functions available when not
26 imported:
27
28 use Color::Calc::WWW(); # don't import
29 Color::Calc::WWW::color('F00');
30
32 By default, all functions are imported.
33
34 All functions recognize all HTML color keywords (through
35 Graphics::ColorNames::WWW) and output the results in WWW-compatible
36 formats, i.e. as one of the 16 basic HTML keywords (see
37 Graphics::ColorNames::WWW) or as #RRGGBB.
38
39 color, color_mix, ...
40 See L<Color::Calc> for a list of available calculation functions.
41
44 Claus Färber <CFAERBER@cpan.org>
45
47 Copyright 2004-2010 Claus Färber.
48
49 This library is free software; you can redistribute it and/or modify it
50 under the same terms as Perl itself.
51
52
53
54perl v5.30.0 2019-07-26 Color::Calc::WWW(3)