.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Color::Scheme 3pm" .TH Color::Scheme 3pm "2021-01-05" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Color::Scheme \- generate pleasant color schemes .SH "VERSION" .IX Header "VERSION" version 1.07 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Color::Scheme; \& \& my $scheme = Color::Scheme\->new \& \->from_hex(\*(Aqff0000\*(Aq) # or \->from_hue(0) \& \->scheme(\*(Aqanalogic\*(Aq) \& \->distance(0.3) \& \->add_complement(1) \& \->variation(\*(Aqpastel\*(Aq) \& \->web_safe(1) \& \& my @list = $scheme\->colors(); \& # @list = ( "999999","666699","ffffff","99cccc", \& # "999999","666699","ffffff","9999cc", \& # "669999","666699","ffffff","99cccc", \& # "cccccc","996666","ffffff","cccc99" ) \& \& my $set = $scheme\->colorset(); \& # $set = [ [ "999999","666699","ffffff","99cccc", ], \& # [ "999999","666699","ffffff","9999cc", ], \& # [ "669999","666699","ffffff","99cccc", ], \& # [ "cccccc","996666","ffffff","cccc99" ] ] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is a Perl implementation of Color Schemes 2 (), a color scheme generator. Start by visitng the Color Schemes 2 web site and playing with the colors. When you want to generate those schemes on the fly, begin using this module. The descriptions herein don't make too much sense without actually seeing the colorful results. .PP Henceforth, paragraphs in quotes denote documentation copied from Color Schemes 2. .PP "Important note: This tool \fIdoesn't use the standard \s-1HSV\s0 or \s-1HSB\s0 model\fR (the same \s-1HSV/HSB\s0 values ie. in Photoshop describe different colors!). The color wheel used here differs from the \s-1RGB\s0 spectre used on computer screens, it's more in accordance with the classical color theory. This is also why some colors (especially shades of blue) make less bright shades than the basic colors of the RGB-model. In plus, the RGB-model uses red-green-blue as primary colors, but the red-yellow-blue combination is used here. This deformation also causes incompatibility in color conversions from RGB-values. Therefore, the \s-1RGB\s0 input (eg. the \s-1HTML\s0 hex values like #F854A9) is not exact, the conversion is rough and sometimes may produce slightly different color." .SH "METHODS" .IX Header "METHODS" .SS "new" .IX Subsection "new" The \f(CW\*(C`new\*(C'\fR method will return a new \f(CW\*(C`Color::Scheme\*(C'\fR object. .SS "colors" .IX Subsection "colors" Returns an array of 4, 8, 12 or 16 colors in \f(CW\*(C`RRGGBB\*(C'\fR hexidecimal notation (without a leading \*(L"#\*(R") depending on the color scheme and addComplement parameter. For each set of four, the first is usually the most saturated color, the second a darkened version, the third a pale version and fourth a less-pale version. .PP For example: With a contrast scheme, \*(L"\fBcolors()\fR\*(R" would return eight colors. Indexes 1 and 5 could be background colors, 2 and 6 could be foreground colors. .PP Trust me, it's much better if you check out the Color Scheme web site, whose \&\s-1URL\s0 is listed in in \*(L"\s-1DESCRIPTION\*(R"\s0. .SS "colorset" .IX Subsection "colorset" Returns a list of lists of the colors in groups of four. This method simply allows you to reference a color in the scheme by its group isntead of its absolute index in the list of colors. I am assuming that \*(L"\fBcolorset()\fR\*(R" will make it easier to use this module with the templating systems that are out there. .PP For example, if you were to follow the synopsis, say you wanted to retrieve the two darkest colors from the first two groups of the scheme, which is typically the second color in the group. You could retrieve them with \&\*(L"\fBcolors()\fR\*(R": .PP .Vb 2 \& my $first_background = ($scheme\->colors)[1]; \& my $second_background = ($scheme\->colors)[5]; .Ve .PP Or, with this method, .PP .Vb 2 \& my $first_background = $scheme\->colorset\->[0][1]; \& my $second_background = $scheme\->colorset\->[1][1]; .Ve .SS "from_hue" .IX Subsection "from_hue" .Vb 1 \& $scheme\->from_hue( $degrees ) .Ve .PP Sets the base color hue, where \f(CW\*(C`degrees\*(C'\fR is an integer. (Values greater than 359 and less than 0 wrap back around the wheel.) .PP The default base hue is 0, or bright red. .SS "from_hex" .IX Subsection "from_hex" .Vb 1 \& $scheme\->from_hex( $color ) .Ve .PP Sets the base color to the given color, where \f(CW\*(C`color\*(C'\fR is in the hexidecimal form \s-1RRGGBB.\s0 \f(CW\*(C`color\*(C'\fR should not be preceded with a hash (#). .PP The default base color is the equivalent of #ff0000, or bright red. .SS "add_complement" .IX Subsection "add_complement" .Vb 1 \& $scheme\->add_complement( $bool ) .Ve .PP If \f(CW$bool\fR is true, an extra set of colors will be produced using the complement of the selected color. .PP This only works with the analogic color scheme. The default is false. .SS "web_safe" .IX Subsection "web_safe" .Vb 1 \& $scheme\->web_safe( $bool ) .Ve .PP Sets whether the colors returned by \*(L"\fBcolors()\fR\*(R" or \*(L"\fBcolorset()\fR\*(R" will be web-safe. .PP The default is false. .SS "distance" .IX Subsection "distance" .Vb 1 \& $scheme\->distance( $float ) .Ve .PP \&\f(CW$float\fR must be a value from 0 to 1. You might use this with the \*(L"triade\*(R", \&\*(L"tetrade\*(R" or \*(L"analogic\*(R" color schemes. .PP The default is 0.5. .SS "scheme" .IX Subsection "scheme" .Vb 1 \& $scheme\->scheme( $name ) .Ve .PP \&\f(CW$name\fR must be a valid color scheme name. See \*(L"\s-1COLOR SCHEMES\*(R"\s0. The default is \*(L"mono\*(R". .SS "variation" .IX Subsection "variation" .Vb 1 \& $scheme\->variation( $name ) .Ve .PP \&\f(CW$name\fR must be a valid color variation name. See \*(L"\s-1COLOR VARIATIONS\*(R"\s0. .SH "COLOR SCHEMES" .IX Header "COLOR SCHEMES" The following documentation is adapated (and mostly copied verbatim) from the Color Schemes 2 help. Use one of these scheme names as an argument to the \&\*(L"\fBscheme()\fR\*(R" method. .SS "monochromatic (or mono)" .IX Subsection "monochromatic (or mono)" "Monochormatic scheme is based on only one color tint, and uses only variations made by changing its saturation and brightness. Black and white colors are always added. The result is comfortable for eyes, even when using aggressive color. However, it's harder to find accents and highlights. .PP \&\*(L"The application makes only several monochromatic variants of each color. You'll be able to make others \- more or less saturated, lighter or darker. Monochromatic variations are made for each color in other schemes, too.\*(R" .SS "contrast" .IX Subsection "contrast" \&\*(L"Base color is supplemented with its complement (color on the opposite side of the wheel). One warm and one cold color is always created \- we have to consider, which one will be dominant, and if the result should look warm, or cold. Suitable monochromatic variations of this two colors may be added to the scheme.\*(R" .SS "triade" .IX Subsection "triade" "Base color is supplemented with two colors, placed identically on both sides of its complement. Unlike the 'sharp' contrast, this scheme is often more comfortable for the eyes, it's softer, and has more space for balancing warm and cold colors. .PP "You can use the \*(L"\fBdistance()\fR\*(R" method to set the distance of these colors from the base color complement. The less the value is, the closer the colors are to the contrast color, and are more similar. The best value is between 0.25 and 0.5. Higher values aren't too suitable \- except the shift by 60°, which makes another color scheme, the triade: .PP \&\*(L"The triade is made by three colors evenly distributed on the thirds of the color wheel (by 120 degrees). The triade-schemes are vibrating, full of energy, and have large space to make contrasts, accents and to balance warm and cold colors. You can make the triade in the 'soft contrast' scheme setting the distance to the maximal value, 1.\*(R" .SS "tetrade" .IX Subsection "tetrade" "This scheme, also known as 'double\-contrast,' is made by a pair of colors and their complements. It's based on the tetrade \- the foursome of colors evenly distributed on the fourths of the color wheel (by 90 degreees). The tetrade is very aggressive color scheme, requiring very good planning and very sensitive approach to relations of these colors. .PP \&\*(L"Less distance between two base colors causes less tension in the result. However, this scheme is always more 'nervous' and 'action' than other schemes. While working with it, we have to take care especially of relations between one color and the complement of its adjacent color \- in case of the tetrade (maximum distance 1), good feeling and very sensitive approach are necessary.\*(R" .SS "analogic" .IX Subsection "analogic" "This scheme is made by base color and its adjacent colors \- two colors identically on both sides. It always looks very elegantly and clear, the result has less tension and it's uniformly warm, or cold. If a color on the warm-cold border is chosen, the color with opposite 'temperature' may be used for accenting the other two colors. .PP "You can set the distance of adjacent colors by using \*(L"\fBdistance()\fR\*(R". Values between 0.25 and 0.5 (15\-30 degrees on the wheel) are optimal. You can also add the contrast color; the scheme is then supplemented with the complement of the base color. It must be treated only as a complement \- it adds tension to the palette, and it's too aggressive when overused. However, used in details and as accent of main colors, it can be very effective and elegant." .SH "COLOR VARIATIONS" .IX Header "COLOR VARIATIONS" \&\*(L"Each of colors in displayed scheme has four variations. These are colors of the same hue, but they differ in the saturation and brightness. ... The very first variation ... is the base variation, which determines the look of the scheme. The other three variations are just additional. Iff the scheme is made by less than four colors, the unused place is used to display variations (or the complement) of the base color.\*(R" .PP Use one of these variation names as an argument to the \*(L"\fBvariation()\fR\*(R" method. .SS "default" .IX Subsection "default" The default preset. Generally pretty nice. .SS "pastel" .IX Subsection "pastel" Softer colors with added whiteness. .SS "soft" .IX Subsection "soft" Darker pastel colors. .SS "light" .IX Subsection "light" Very light, almost washed-out colors. .SS "hard" .IX Subsection "hard" Deeper, more-saturated colors. .SS "pale" .IX Subsection "pale" Greyer, less-saturated colors. .SH "CREDIT" .IX Header "CREDIT" Color Schemes 2, its documentation and original JavaScript code are copyright pixy .PP The author has explicitly granted license for this distribution of code to be redistribute as specified in the \*(L"\s-1COPYRIGHT AND LICENSE\*(R"\s0 section. .SH "AUTHOR" .IX Header "AUTHOR" Ian Langworth .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Ian Langworth .IP "\(bu" 4 Ricardo Signes .IP "\(bu" 4 Yanick Champoux .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2005 by Ian Langworth. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.