Graphi...es::WWW(3pm)

πŸ“¦
version 1.14 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Graphics::ColorNames::WWW πŸ’–

okay bestie, so this is the Perl doc for Graphics::ColorNames::WWW β€” it's a module that lives in the Graphics::ColorNames family, and it's literally just out here handing you WWW color names with their matching RGB values. it's giving color dictionary. it's giving ✨palette✨.


πŸŽ€ SYNOPSIS πŸŽ€

no thoughts, just vibes:

require Graphics::ColorNames::WWW;

$NameTable = Graphics::ColorNames::WWW->NamesRgbTable();
$RgbBlack  = $NameTable->{black};

🌈 DESCRIPTION 🌈

so what this module does is define color names and their associated RGB values pulled straight from various WWW specifications β€” think SVG, think CSS, think the common browser implementations everyone actually ships. πŸ’…

if you wanna know how to actually use this thing, go read the docs for Graphics::ColorNames. that's the main character; this module is the sidekick with a very good outfit.

as of right now, SVG and CSS define the exact same color keywords and they also include every color keyword that common web browsers support. which means Graphics::ColorNames::WWW, Graphics::ColorNames::SVG and Graphics::ColorNames::CSS all behave in identical ways. no cap, they're triplets.

this might change if the specs ever decide to diverge (drama!), and if that happens, this module will become a superset of all the color keywords defined by W3C's specs. πŸ‘‘

ngl, it's recommended that you use this module β€” unless you specifically need exact compatibility with the CSS and SVG specifications, or with specific browsers. then go be specific, queen.

πŸ¦‹ NOTE πŸ¦‹

so reportedly, "fuchsia" was misspelled as "fuscia" in some unidentified HTML specification. 😭 and it's also just a super common misspelling in the wild, so this module recognizes both names. we accept her either way. inclusivity icon.


πŸ’€ LIMITATIONS πŸ’€

the "transparent" keyword is unsupported. currently, Graphics::ColorNames does not allow RGBA values. so no alpha channel, bestie. we stay opaque.

also β€” and this is important β€” the system color keywords are not assigned to a fixed RGB value, so they are unsupported too:

ActiveBorder, ActiveCaption, AppWorkspace, Background, ButtonFace, ButtonHighlight, ButtonShadow, ButtonText, CaptionText, GrayText, Highlight, HighlightText, InactiveBorder, InactiveCaption, InactiveCaptionText, InfoBackground, InfoText, Menu, MenuText, Scrollbar, ThreeDDarkShadow, ThreeDFace, ThreeDHighlight, ThreeDLightShadow, ThreeDShadow, Window, WindowFrame, WindowText

and just so you know: those are deprecated in CSS3. so it's not even a loss, fr fr.

🌸 SEE ALSO 🌸

go peek at the siblings when you're done here:

  • Graphics::ColorNames::HTML
  • Graphics::ColorNames::CSS
  • Graphics::ColorNames::SVG

πŸ‘‘ AUTHOR πŸ‘‘

Claus Faerber <CFAERBER@cpan.org>

Based on "Graphics::ColorNames::HTML" by Robert Rothenberg.


πŸ“œ LICENSE πŸ“œ

Copyright 2005-2009 Claus Faerber.

Copyright 2001-2004 Robert Rothenberg.

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


aaaand that's the whole page, bestie 🫢 this was perl v5.28.1, dated 2019-08-21, from the User Contributed Perl Documentation β€” mwah, go name some colors πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from