---
title: "rgbOf"
description: "The RGB channels of a color, without its alpha."
group: "paint"
groupTitle: "Painting"
categoryId: "patterns"
categorySlug: "patterns"
categoryTitle: "Patterns & tiling"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/patterns.ts#L303"
---

# rgbOf

The RGB channels of a color, without its alpha.

```ts
rgbOf(color: PaintSlot): PatternPaint
```

Import `patterns` from `shaders/std` and use `patterns.rgbOf`.

Finish it with `opaque` or `withAlpha` to make a color again.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `color` | `PaintSlot` |  |

## Example

```ts
paint: opaque(mixOf(times(rgbOf(cubeColor), faces.tone), rgbOf(p('lineColor')), faces.wire))
```

## See also

- [`alphaOf`](/docs/primitives/patterns/alphaof) — The alpha channel of a color, as a number per pixel.
- [`opaque`](/docs/primitives/patterns/opaque) — An RGB value finished as a fully opaque color.

## Used by

[IsometricCubes](/docs/components/isometriccubes)