+{
+ # test ->hsv
+ my $c = Imager::Color->new(255, 0, 0);
+ my($h,$s,$v) = $c->hsv;
+ is($h,0,'red hue');
+ is($s,1,'red saturation');
+ is($v,1,'red value');
+
+ $c = Imager::Color->new(0, 255, 0);
+ ($h,$s,$v) = $c->hsv;
+ is($h,120,'green hue');
+ is($s,1,'green saturation');
+ is($v,1,'green value');
+
+ $c = Imager::Color->new(0, 0, 255);
+ ($h,$s,$v) = $c->hsv;
+ is($h,240,'blue hue');
+ is($s,1,'blue saturation');
+ is($v,1,'blue value');
+
+ $c = Imager::Color->new(255, 255, 255);
+ ($h,$s,$v) = $c->hsv;
+ is($h,0,'white hue');
+ is($s,0,'white saturation');
+ is($v,1,'white value');
+
+ $c = Imager::Color->new(0, 0, 0);
+ ($h,$s,$v) = $c->hsv;
+ is($h,0,'black hue');
+ is($s,0,'black saturation');
+ is($v,0,'black value');
+}
+