PDF::Bu...orSpace(3)

✨ PDF::Builder::Resource::ColorSpace ✨

okay bestie, welcome to PDF::Builder::Resource::ColorSpace(3) πŸ’– this is the base class for all the PDF color spaces β€” like, every other color space is a lil baby that inherits from this one. it's giving founder energy. πŸ‘‘

Inherits from PDF::Builder::Basic::PDF::Array 🫢

so yes, it's literally an Array underneath. it ate and left no crumbs. ✨


🌸 METHODS 🌸

πŸŽ€ new

$cs = PDF::Builder::Resource::ColorSpace->new($pdf, $key, %opts)

returns a brand new colorspace object πŸ’… this is the base class for all colorspaces</u>, so it's the blueprint β€” the main character, if you will. every colorspace starts its journey right here. 🌈

πŸ¦‹ name

$name = $res->name($name) # Set
$name = $res->name() # Get

getter AND setter, we love a versatile queen πŸ˜­πŸ’– pass in a $name and it sets the Name of the resource; call it with no args and it hands you the Name of the resource back. that's it, that's the whole vibe. no cap. ✨

🧚 param

@param = $cs->param(@param)

returns properly formatted color-parameters based on the colorspace πŸ“ like it takes your params, and it formats them the way that specific colorspace wants them. so fetch. πŸ’œ


πŸ’€ heads up bestie: the manual name here is PDF::Bu...orSpace (yes, it's truncated in the actual header, not a typo of mine, don't @ me πŸ™ˆ).

and that's the whole page, fr fr. no plot twist, just clean inheritance and three methods. slay. πŸŽ€

perl v5.42.0 Β· 2026-01-17 Β· mwah, that's the source and date, love u, bye bestie πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from