.\" -*- 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::Name::Scheme 3" .TH Graphics::Toolkit::Color::Name::Scheme 3 2026-03-09 "perl v5.42.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 Graphics::Toolkit::Color::Name::Scheme \- a name space for color names .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 7 \& use Graphics::Toolkit::Color::Name::Scheme; \& my $scheme = Graphics::Toolkit::Color::Name::Scheme\->new(); \& $scheme\->add_color( $_\->{\*(Aqname\*(Aq}, $_\->{\*(Aqrgb_values\*(Aq} ) for @colors; \& say for $scheme\->all_names(); \& my $values = $scheme\->values_from_name( \*(Aqblue\*(Aq ); # tuple = 3 element ARRAY \& my $names = $scheme\->names_from_values( $values ); # tuple \-> ARRAY of names \& my ($names, $distance) = $scheme\->closest_name( $values ); # tuple \-> \e@names, $distance .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module is mainly for internal usage to model name spaces for HTML, SVG, Pantone ... colors. You may Use it to create your own set color names or to give color name constante slightly different values. .SH ROUTINES .IX Header "ROUTINES" .SS new .IX Subsection "new" Needs no arguments. .SS "sub add_color" .IX Subsection "sub add_color" takes two positional arguments, a color name a n ARRAY with three RGB values in range of 0 .. 255. .SS all_names .IX Subsection "all_names" List of all names held by the scheme. .SS is_name_taken .IX Subsection "is_name_taken" Pseudo boolean tells you if given name is already held. .SS values_from_name .IX Subsection "values_from_name" Returns the value tuple associated with the name. .SS names_from_values .IX Subsection "names_from_values" Returns ARRAY ref with all names associated with these RGB values or an empty string if none. .SS closest_names .IX Subsection "closest_names" Returns ARRAY ref with all names associated with RGB values from this scheme that are the closest. Second return value is the distance between these closest names and the given value tuple (irst and only parameter). .SH "SEE ALSO" .IX Header "SEE ALSO" Color::Library .PP Graphics::ColorNamesLite::All .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" Copyright 2025 Herbert Breunung. .PP This program is free software; you can redistribute it and/or modify it under same terms as Perl itself. .SH AUTHOR .IX Header "AUTHOR" Herbert Breunung,