---
title: "color"
description: "A `color` token. Accepts any CSS color, including `light-dark()`, `color-mix()`, and `currentColor`, plus DTCG's structured form."
url: "https://pitlane.tools/package/theme/schema/function/color"
---

# color

```ts
import { color } from "@pitlane/theme/schema";
```

```ts
function color(): TokenSchema<"color">;
```

A `color` token. Accepts any CSS color, including `light-dark()`, `color-mix()`, and `currentColor`, plus DTCG's structured form.

## Returns

[`TokenSchema`](https://pitlane.tools/package/theme/schema/interface/TokenSchema.md)\<`"color"`>

A schema declaring the `color` token type

## Example

```ts
let schema = { color: s.color() };
let tokens = { color: { white: "#fff", page: lightDark("#fff", "#111") } };
```
