diff --git a/src/colormap/colors.py b/src/colormap/colors.py index 6671d16..877a41e 100644 --- a/src/colormap/colors.py +++ b/src/colormap/colors.py @@ -668,7 +668,7 @@ def _set_blue(self, blue): blue = property(_get_blue, _set_blue, doc="getter/setter for the blue color in RGB triplet") def _get_value(self): - return self.hls[0] + return self.hsv[2] def _set_value(self, value): h, s, v = self.hsv diff --git a/test/test_colors.py b/test/test_colors.py index 3ae015f..21ebd64 100644 --- a/test/test_colors.py +++ b/test/test_colors.py @@ -89,6 +89,7 @@ def testColors(): assert c.rgb == (0, 0 ,1) assert c.hex == "#0000FF" assert_list_almost_equal( c.hsv, (0.66666666666666,1,1)) + assert c.value == 1 assert_list_almost_equal(c.hls, (0.666666666666666, .5,1)) print(c)