from_name method
from_name(name)
Creates a color from the specified name of a predefined color.
The lookup is case-insensitive and ignores underscores and spaces: "LightBlue", "lightblue" and "light_blue" all resolve to Color.light_blue. See the Color class page for the list of predefined colors.
Returns
The named color.
@staticmethod
def from_name(name):
...
| Parameter | Type | Description |
|---|---|---|
| name | str | A string that is the name of a predefined color. |
Exceptions
| Exception | Description |
|---|---|
| ValueError | The name is not a name of a predefined color. |
| TypeError | The name is not a string. |
See Also
- class
Color - module
aspose.slides - library
Aspose.Slides