<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@csstools/css-color-parser](./css-color-parser.md) &gt; [color](./css-color-parser.color.md)

## color() function

Convert a color function to a `ColorData` object.

**Signature:**

```typescript
export declare function color(colorNode: ComponentValue): ColorData | false;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

colorNode


</td><td>

ComponentValue


</td><td>

The color function to be converted.


</td></tr>
</tbody></table>

**Returns:**

[ColorData](./css-color-parser.colordata.md) \| false

{<!-- -->ColorData\|false<!-- -->} The color function as a `ColorData` object or `false` if it could not be converted.

