Beispiel #1
0
 def test_1(self):
     """
     interpolate_rgb(a, b) converts a and b to RGB colors
     """
     i = interpolate.rgb(Color("steelblue"), Color("brown"))
     self.assertEqual(i(0), Color("steelblue"))
     self.assertEqual(i(1), Color("brown"))
Beispiel #2
0
 def test_1(self):
     """
     interpolate_rgb(a, b) converts a and b to RGB colors
     """
     i = interpolate.rgb( Color("steelblue"), Color("brown"))
     self.assertEqual(i(0), Color("steelblue"))
     self.assertEqual(i(1), Color("brown"))
Beispiel #3
0
 def test_2(self):
     """
     interpolate_rgb(a, b) interpolates in RGB and returns a hexadecimal string
     """
     i = interpolate.rgb(Color("steelblue"), Color("#f00"))
     self.assertEqual(i(.2), Color("#6b6890"))
Beispiel #4
0
 def test_2(self):
     """
     interpolate_rgb(a, b) interpolates in RGB and returns a hexadecimal string
     """
     i = interpolate.rgb(Color("steelblue"), Color("#f00"))
     self.assertEqual(i(.2), Color("#6b6890"))