コード例 #1
0
 def test_halfing_saturator_in_range(self):
     color = HexColor('5a482b')
     expected = HexColor('5a281b')
     color.subtractive_saturator()
     self.assertEqual(color, expected)
コード例 #2
0
 def test_halfing_saturator_out_of_range(self):
     color = HexColor('fac80b')
     expected = HexColor('fa680b')
     color.subtractive_saturator()
     self.assertEqual(color, expected)
コード例 #3
0
 def test_subtractive_saturator_out_of_range(self):
     color = HexColor('5a482b')
     expected = HexColor('5a080b')
     color.subtractive_saturator(10)
     self.assertEqual(color, expected)