
## to_string {#bool-bool-int}

Converts color components to string representation.


### Returns 


String representation of the color components.


```python
def to_string(self, include_alpha, as_decimal, digits):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| include_alpha | bool | Specifies whether to add Alpha component. |
| as_decimal | bool | Specifies whether color components are preserved as a decimal number or as a percentage. |
| digits | int | Sets the rounding precision for color components. |



### See Also
* module [`aspose.html.drawing`](../../)
* class [`IColorComponents`](/html/python-net/aspose.html.drawing/icolorcomponents)
