Exemple #1
0
 def test_rgb_to_pil(self):
   assert_almost_equal(0x0080ff, grapefruit.rgb_to_pil(1, 0.5, 0))
   assert_items_almost_equal((1.0, 0.5020, 0), grapefruit.pil_to_rgb(0x0080ff))
 def test_rgb_to_pil(self):
     assert_almost_equal(0x0080ff, grapefruit.rgb_to_pil(1, 0.5, 0))
     assert_items_almost_equal((1.0, 0.5020, 0),
                               grapefruit.pil_to_rgb(0x0080ff))
Exemple #3
0
 def test_rgb_to_pil_tuple(self):
   assert_almost_equal(0x0080ff, grapefruit.rgb_to_pil((1, 0.5, 0)))
 def test_rgb_to_pil_tuple(self):
     assert_almost_equal(0x0080ff, grapefruit.rgb_to_pil((1, 0.5, 0)))