# Style

Sizes, variants, palette resolution and the capsule limb geometry — plus the CSS variables and keyframes the whole set is themed with.

> For the complete index, see [llms.txt](https://robocn.dev/llms.txt). A Markdown version of any page is available by appending `.md` to its URL or by sending an `Accept: text/markdown` header.

## Install

```bash
bunx --bun shadcn@latest add https://robocn.dev/r/robot-style.json
```

Registry item: `robot-style` · [`https://robocn.dev/r/robot-style.json`](https://robocn.dev/r/robot-style.json)

## Usage

```tsx
:root {
  --robot-shell: oklch(0.72 0.17 47);
  --robot-accent: oklch(0.72 0.15 176);
}
```

## API

| name | type | default | description |
| --- | --- | --- | --- |
| `resolveRobotPalette` | `(props) => RobotPalette` | — | Prop, then CSS variable, then built-in default, for each of shell, metal, dark, accent, glow, grid and foreground. |
| `robotSurface` | `(role, variant, palette, weight?) => RobotSurface` | — | Fill, stroke and weight for one part, under one paint variant. |
| `capsulePath` | `(a, b, radius) => string` | — | The limb silhouette every machine in the set is drawn from. |
| `mountTransform / labelTransform` | `(mount, …) => string` | — | Puts the drawing in robot coordinates for a given mount, and turns labels back the right way up. |
| `px` | `(value: number) => number` | — | Rounds a coordinate before it reaches the DOM. Trigonometry differs in the last bits between Node and the browser, and unrounded values show up as hydration mismatches. |

## Source

- `src/lib/robocn/style.ts`
