Skip to content

Commit f35b5b6

Browse files
rcomermeeseeksmachine
authored andcommitted
Backport PR matplotlib#31904: DOC: clarify valid inputs and return type of same_color
1 parent f05f507 commit f35b5b6

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

lib/matplotlib/colors.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,15 @@ def same_color(c1, c2):
288288
"""
289289
Return whether the colors *c1* and *c2* are the same.
290290
291-
*c1*, *c2* can be single colors or lists/arrays of colors.
291+
Parameters
292+
----------
293+
c1, c2 : :mpltype:`color` or list of :mpltype:`color` or RGB(A) array
294+
If passing multiple colors, *c1* and *c2* must be of the same length. RGB(A)
295+
arrays must be of shape (ncolors, 3) or (ncolors, 4).
296+
297+
Returns
298+
-------
299+
bool
292300
"""
293301
c1 = to_rgba_array(c1)
294302
c2 = to_rgba_array(c2)

0 commit comments

Comments
 (0)