Color-TupleEncode

 view release on metacpan or  search on metacpan

lib/Color/TupleEncode/2Way.pm  view on Meta::CPAN

     
           0  red      0
          45  orange   0.25
          90  lime     0.5
         135  green    0.75
  hzero  180  cyan     1
         240  blue     1.5
         270  violet   2
         300  purple   3
         315  purple   4
           0  red      INF, NaN (y=0)

=head2 Saturation

The saturation is calculated using the size of the 2-tuple, C<r = sqrt( x**2 + y**2 )>. Depending on the value of C<power>, 

    r = sqrt ( x**2 + y **2 )

                      -r/power
    saturation = 1 - 2           if power > 0



( run in 0.235 second using v1.01-cache-2.11-cpan-4d50c553e7e )