.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "Graphics::Toolkit::Color::Manual::Name 3" .TH Graphics::Toolkit::Color::Manual::Name 3 2026-06-21 "perl v5.42.2" "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 Graphics::Toolkit::Color::Manual::Name \- GTC color name handling .SH SYNOPSIS .IX Header "SYNOPSIS" This manual page explains all there is to know when using color names in GTC. The first chapter describes their role in the overall functionality of the library. The second defines their syntax. (How to write them?) The next outlines the coverage of the built\-in names (default scheme). And the last chapter illustrates the concept of a color scheme and how to use them. This is important background to understand the results and inner workings of the methods: name and closest_name. .SH ROLE .IX Header "ROLE" Because it is intuitive and relatively effortless for humans to refer to colors by name, GTC can interpret them as a convenience. But after the name is read, it gets translated into RGB values, since most GTC functionality is about calculating numeric color values. So color names are just one format among many and thus mostly a part of the IO layer. .SH SYNTAX .IX Header "SYNTAX" Color names are mere strings that get normalized to allow a greater flexibility in usage. Upper and lower case can be chosen freely. And also some special characters like the underscore \fI\*(Aq_\*(Aq\fR, dash \fI\*(Aq\-\*(Aq\fR, whitespace \fI\*(Aq \*(Aq\fR, the apostrophe \fI\*(Aq\fR and the dot \fI\*(Aq.\*(Aq\fR, that are even sometimes part of the official name, may be inserted or removed. That can sometimes improve readability (\f(CW\*(Aqtrue_red\*(Aq\fR) or help you to adapt the spelling of color names to local standards without additional effort. GTC output will always contain normalized names without special characters and in complete lowercase. .PP There is only one character in GTC color names that holds a special meaning, which is the colon \fI\*(Aq:\*(Aq\fR. It separates the scheme name on the left side from the actual color name on the right (\fI\*(AqSVG:green\*(Aq\fR). You might think of schemes as name spaces for color names. Color names without a colon are from the default scheme (\fI\*(Aqblue\*(Aq\fR). .SH DEFAULT .IX Header "DEFAULT" The default scheme contains 716 color names which all can be retrieved with: .PP .Vb 1 \& my @names = Graphics::Toolkit::Color::Name::all(); .Ve .PP But they can also be seen by name and with their color displayed under: "NAMES" in Graphics::Toolkit::Color::Name::Constant. They are assembled from the \fIX11\fR and \fIHTML\fR (\fISVG\fR) standard, which are most of the commonly used color names on the internet. But a lot of them are not aesthetically pleasing. For that reason also the colors of the Pantone reports were added. They often have longer, more complicated names but they are picked by designers. .PP Because the default scheme contains so many names, some colors end up with having several names. For that reason the names are grouped by importance, so if you ask for just one color name, you will get the better known one (for instance \fI\*(Aqgray\*(Aq\fR and not \fI\*(Aqgray50\*(Aq\fR). .SH SCHEME .IX Header "SCHEME" Besides the just mentioned default color name scheme, there are no other schemes that come with GTC. They have to be obtained separately. For instance to access the names of the \fISVG\fR standard, you have to install the module Graphics::ColorNames::SVG, which of course depends on the module Graphics::ColorNames. The list of available schemes includes: \fICrayola\fR, \fICSS\fR, \fIEmergyC\fR, \fIGrayScale\fR, \fIHTML\fR, \&\fIIE\fR, \fIMozilla\fR, \fINetscape\fR, \fIPantone\fR, \fIPantoneReport\fR, \fISVG\fR, \&\fIVACCC\fR, \fIWerner\fR, \fIWindows\fR and \fIWWW\fR. The following code will check what is already installed: .PP .Vb 1 \& my @schemes = Graphics::ColorNames::all_schemes(); .Ve .PP Conveniently all modules can be installed at once with Bundle::Graphics::ColorNames and you can also create your own, which is explained here. .SH AUTHOR .IX Header "AUTHOR" Herbert Breunung, .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2026 Herbert Breunung. .SH LICENSE .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.