---
title: "hueWheel"
description: "A rainbow color for a hue value: 0 is red, cycling through the spectrum and back every 1."
group: "paint"
groupTitle: "Painting"
categoryId: "paint"
categorySlug: "paint"
categoryTitle: "Fields, palettes & ramps"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/fields.ts#L609"
---

# hueWheel

A rainbow color for a hue value: 0 is red, cycling through the spectrum and back every 1.

```ts
hueWheel(h: Expr): Expr
```

Import `paint` from `shaders/std` and use `paint.hueWheel`.

Takes any number and wraps it. Returns an rgb color with no alpha.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `h` | `Expr` |  |

## Example

```ts
const rgb = hueWheel(math.add(math.mul(angle, 0.42), animatedTime(params)))
```

## Used by

[Prism](/docs/components/prism)