# color

function in `@dioramajs/diorama`

```ts
import { color } from '@dioramajs/diorama'
```

Colour param. A CSS colour string on the CPU, as written; a `color` uniform on the GPU. The
uniform reads `var(--name)` and `currentColor` from the element when the value is written and
again in every frame the element draws, so a theme switch shows with the next frame. Code that
reads the string itself resolves it with `cssColor(value, element)` of `@dioramajs/render`.

```ts
function color(value: string): ColorParam
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` |  |

Also exported from `@dioramajs/diorama/auto`, `@dioramajs/diorama/effects`, `@dioramajs/effects`.

Defined in [packages/effects/src/define.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/define.ts#L76).
