Color:...::Types(3pm)

πŸ“¦
version 0.100004 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’… Color::Palette::Types β€” the tea β˜•

okay bestie, listen up, this is the User Contributed Perl Documentation page for Color::Palette::Types(3pm), and it's giving "tiny module, big personality". It's a little stash of type constraints that you use alongside Color::Palette. That's the whole vibe. πŸŽ€


✨ NAME ✨

Color::Palette::Types β€” type constraints for use with Color::Palette. slay, we love a one-liner. πŸ’–


🌸 VERSION 🌸

version 0.100004 πŸ¦‹


🧚 PERL VERSION 🧚

so this library is designed to run on perls released even a long time ago. Like, genuinely ancient ones. It should work on any version of perl released in the last five years. no cap. 🫢

⚠️ but here's the fine print, bestie: even though it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so like… don't come for her. 😭

🐻 BEAR WITH ME 🐻

okay so real talk: "I'm not yet sure how best to document a type library." β€” the author, being extremely honest with us. iconic behavior honestly. πŸ™ˆ


πŸ‘‘ TYPES πŸ‘‘

here's the lineup. the following types are defined:

  • Color β€” a Graphics::Color object πŸ’œ
  • Palette β€” a Color::Palette::Color object 🎨
  • ColorName β€” a valid color name: /\\A[a-z][-a-z0-9]*\\z/i πŸ”€
  • ColorDict β€” a hash mapping ColorName to Color πŸ—‚οΈ
  • RecursiveColorDict β€” a hash mapping ColorName to (Color | ColorName) πŸ”
  • HexColorStr β€” a string like #000 or #ababab 🌈
  • ArrayRGB β€” an ArrayRef of three Bytes πŸ“¦
  • Byte β€” and Int from 0 to 255 πŸ”’

and now the fun part, bestie: Colors can be coerced from ArrayRGB or HexColorStr, and dicts of colors try to coerce, too. the way that just works? obsessed. ✨


πŸ’Œ AUTHOR πŸ’Œ

Ricardo SIGNES <cpan@semiotic.systems> β€” thank you for your service, king. πŸ‘‘


This software is copyright (c) 2022 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. πŸ’–


and that's the whole page, bestie! this one was generated by perl v5.36.0 and stamped with the date 2023-01-08, so go forth and type-constrain responsibly. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from