---
title: "rings"
description: "Repeats a field as concentric bands."
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#L382"
---

# rings

Repeats a field as concentric bands.

```ts
rings(field: Field, count: FieldScalar): Field
```

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

`count` above 1 restarts the field every 1/count, so a radial gradient becomes rings. At 1 or below the field is clamped to 0–1, and values under 1 stretch the gradient further out.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `field` | `Field` |  |
| `count` | `FieldScalar` |  |

## Example

```ts
paint: rampOver(rings(dist.radial({center: p('center'), radius: p('radius'), aspect: 1, skew: 0}), p('repeat')), stops(p('colorSpace')))
```

> **Tip.** Each band restarts at the first color rather than bouncing back. For a mirrored repeat, pass `edges` to `rampOver` instead.

## See also

- [`tiles`](/docs/primitives/paint/tiles) — Repeats a field `count` times, always wrapping.
- [`rampOver`](/docs/primitives/paint/rampover) — A paint that colors each pixel by looking its field value up in a palette.

## Used by

[DiamondGradient](/docs/components/diamondgradient), [RadialGradient](/docs/components/radialgradient)