Color:...ionary(3pm)
π NAME π
Color::Library::Dictionary β bestie, this is the color dictionary for Color::Library. That's it, that's the whole vibe. π
β¨ METHODS β¨
So like, here's everything your dictionary object can do for you. Slay. π
π¦ @colors = $dictionary->colors
Gives you back the list of Color::Library::Color objects that $dictionary is holding. All of them. The whole squad. π
Heads up tho β context matters, no cap: you get a list in list context, and a list reference in scalar context. Same deal, different wrapper. π«Ά
πΈ @names = $dictionary->names
πΈ @names = $dictionary->color_names
Returns the list of color names contained by $dictionary. Two method names, same energy, pick whichever one feels right for your soul. β¨
And yes, same context rules: list in list context, list reference in scalar context. Periodt.
π $color = $dictionary->color( <query> )
Returns a Color::Library::Color object of $dictionary found via <query>. It's giving "search bar but make it fancy". π
And a query can be any of the following:
- color name β a color name is like
"blue"or"bleached-almond"π - color title β a color title is like
"Dark Green-Teal"π - color id β a color id is in the form of
<dictionary_id>:<color_name>, for example:"x11:azure1"π
π§ $id = $dictionary->id
π§ $name = $dictionary->name
Returns the id (name) of $dictionary, e.g.
svg
x11
vaccc
nbs-iscc-f
π $title = $dictionary->title
Returns the title of $dictionary, e.g.
SVG
X11
VACCC
NBS/ISCC F
π $subtitle = $dictionary->subtitle
Returns the subtitle of $dictionary, if any. If there isn't oneβ¦ well, it's giving nothing. And that's fine. π
π« $description = $dictionary->description
Returns the description of $dictionary, if any. Same deal as the subtitle β only if it exists, bestie. π
ngl the fact that you read the whole page? main character energy fr fr. π«Ά
okay bye ily, this was perl v5.36.0 from 2022-11-27, User Contributed Perl Documentation, xoxo πβ¨π
π¦ where this page comes from
- debian bookworm: libcolor-library-perl 0.021-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcolor-library-perl 0.021-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcolor-library-perl 0.021-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms