---
title: "times"
description: "The product of two values: a mask scaled by a prop, an RGB dimmed by a shade, two masks combined."
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#L317"
---

# times

The product of two values: a mask scaled by a prop, an RGB dimmed by a shade, two masks combined.

```ts
times(a: PaintSlot, b: PaintSlot): PatternPaint
```

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

## Parameters

| Name | Type | Notes |
|---|---|---|
| `a` | `PaintSlot` |  |
| `b` | `PaintSlot` |  |

## Example

```ts
mask: times(faces.random, p('colorVariation'))
```

## See also

- [`mixOf`](/docs/primitives/patterns/mixof) — A straight blend from one value to another by an amount from 0 to 1.
- [`vary`](/docs/primitives/patterns/vary) — A color lightened or darkened per cell by a shade factor, alpha untouched.

## Used by

[FallingLines](/docs/components/fallinglines), [IsometricCubes](/docs/components/isometriccubes)