def test_rgb_to_xyz(self): assert_items_almost_equal((0.4890, 0.3657, 0.04485), grapefruit.rgb_to_xyz(1, 0.5, 0)) assert_items_almost_equal((1, 0.5, 0), grapefruit.xyz_to_rgb(0.488941, 0.365682, 0.0448137))
def test_rgb_to_xyz(self): assert_items_almost_equal((0.4890, 0.3657, 0.04485), grapefruit.rgb_to_xyz(1, 0.5, 0)) assert_items_almost_equal( (1, 0.5, 0), grapefruit.xyz_to_rgb(0.488941, 0.365682, 0.0448137))
def test_rgb_to_xyz_tuple(self): assert_items_almost_equal((0.4890, 0.3657, 0.04485), grapefruit.rgb_to_xyz((1, 0.5, 0)))