File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ def is_color_like(c):
121
121
def to_rgba (c , alpha = None ):
122
122
"""Convert `c` to an RGBA color.
123
123
124
- If `alpha` is not `None`, it forces the alpha value.
124
+ If `alpha` is not `None`, it forces the alpha value, except if `c` is
125
+ "none" (case-insensitive), which always maps to `(0, 0, 0, 0)`.
125
126
"""
126
127
# Special-case nth color syntax because it should not be cached.
127
128
if _is_nth_color (c ):
@@ -143,7 +144,8 @@ def to_rgba(c, alpha=None):
143
144
def _to_rgba_no_colorcycle (c , alpha = None ):
144
145
"""Convert `c` to an RGBA color, with no support for color-cycle syntax.
145
146
146
- If `alpha` is not `None`, it forces the alpha value.
147
+ If `alpha` is not `None`, it forces the alpha value, except if `c` is
148
+ "none" (case-insensitive), which always maps to `(0, 0, 0, 0)`.
147
149
"""
148
150
orig_c = c
149
151
if isinstance (c , six .string_types ):
You can’t perform that action at this time.
0 commit comments