from_name method
Leave feedback
On this page
Creates a color from the specified name of a known color.
def from_name(cls, name):
...
| Parameter | Type | Description |
|---|---|---|
| name | str |
The name of a known color, such as Red or Black. |
Returns: Color: The named color.
| Raises | Description |
|---|---|
ValueError |
name is not a known color name. |
- class
Color
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.