Subject: | as_RGB presents interesting interface and returns negative values |
my $colour = Graphics::ColorObject->new_Lab([$l, $a, $b] );
my ( $red,$green,$blue ) = @{$colour -> as_RGB()};
$red = round($red*255);
$blue = round($blue*255);
$green = round($green*255);
if ( $red < 0 ) { $red = $red *-1 };
if ( $green < 0 ) { $green = $green *-1 };
if ( $blue < 0 ) { $blue = $blue *-1 };
push @palette,[ $red, $green, $blue ];
Core problem - RGB problems are returned as negative in some instances.
Additionally, the warns mentioned elsewhere and it would be nice to have
a asRGB255.
Lastly - struggling to figure out why colour elements returned need
dereferencing via an array.