---
title: "from_name method"
url: "https://reference.aspose.com/cad/python-net/aspose.cad/color/from_name/"
product: "Aspose.CAD for Python via .NET API References"
---


## from_name {#str}

Creates a [`Color`](/cad/python-net/aspose.cad/color) structure from the specified name of a predefined color.


### Returns 


The [`Color`](/cad/python-net/aspose.cad/color) that this method creates.


```python
def from_name(self, name):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| name | str | A string that is the name of a predefined color. Valid names are the same as the names of the elements of the [`KnownColor`](/cad/python-net/aspose.cad/knowncolor) enumeration. |



### See Also
* module [`aspose.cad`](../../)
* class [`Color`](/cad/python-net/aspose.cad/color)
* class [`KnownColor`](/cad/python-net/aspose.cad/knowncolor)
