Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

HSV/HSL in SVG?

by BernieC (Pilgrim)
on May 16, 2022 at 11:01 UTC ( [id://11143912]=perlquestion: print w/replies, xml ) Need Help??

BernieC has asked for the wisdom of the Perl Monks concerning the following question:

I'm doing some graphics hacking with the SVG module and it works great.. but... RBG is a bit of a crude color hammer. Is there a way to do HSL or HSV color selection with the SVG module?

Replies are listed 'Best First'.
Re: HSV/HSL in SVG?
by choroba (Cardinal) on May 16, 2022 at 11:23 UTC
    Convert::Color?

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      I started to reply with a link to the relevant formulas on Wikipedia but then looking in the source for e.g. Convert::Color::HSV it already contains a link to the same so this is probably the best place to start if you want off-the-shelf.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

        Perfect.. thanks!!
Re: HSV/HSL in SVG?
by etj (Deacon) on May 18, 2022 at 23:30 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11143912]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-03-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found