Remove depreciated Color.to_tuple

This commit is contained in:
Jonathan Wagenet 2025-11-12 12:29:48 -05:00
parent cc34b5a743
commit 083cb1611c
2 changed files with 0 additions and 14 deletions

View file

@ -1319,16 +1319,6 @@ class Color:
self.iter_index += 1
return value
def to_tuple(self):
"""Value as tuple"""
warnings.warn(
"to_tuple is deprecated and will be removed in a future version. "
"Use 'tuple(Color)' instead.",
DeprecationWarning,
stacklevel=2,
)
return tuple(self)
def __copy__(self) -> Color:
"""Return copy of self"""
return Color(*tuple(self))

View file

@ -167,10 +167,6 @@ def test_rgba_wrapped():
assert c.wrapped.GetRGB().Blue() == 0.0
assert c.wrapped.Alpha() == 0.5
def test_to_tuple():
c = Color("blue", alpha=0.5)
np.testing.assert_allclose(tuple(c), (0, 0, 1, 0.5), rtol=1e-5)
def test_copy():
c = Color(0.1, 0.2, 0.3, alpha=0.4)
c_copy = copy.copy(c)