Skip to content

Commit 68e8f05

Browse files
committed
add a versionchanged note
1 parent ae96a23 commit 68e8f05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/reST/ref/color.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
:returns: a newly created :class:`Color` object
9393
:rtype: Color
9494

95+
.. versionchanged:: 2.5.6
96+
``bytes(Color(...))`` (assuming `bytes <https://docs.python.org/3/library/stdtypes.html#bytes>`_ is
97+
the built-in type) now returns a ``bytes`` object (of length 4) with the RGBA values of the color,
98+
as opposed to :class:`Color` being interpreted as an integer (think ``int(Color(...))``) causing it
99+
to return a ``bytes`` object filled with 0s the length of said integer.
95100
.. versionchangedold:: 2.0.0
96101
Support for tuples, lists, and :class:`Color` objects when creating
97102
:class:`Color` objects.

0 commit comments

Comments
 (0)