---
title: "tintRamp"
description: "Maps a lighting value (0 dark, 1 light) onto two colors."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "materials"
categorySlug: "materials"
categoryTitle: "Materials & surfaces"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/materials.ts#L698"
---

# tintRamp

Maps a lighting value (0 dark, 1 light) onto two colors.

```ts
tintRamp(t: Expr, dark: Expr, light: Expr): Expr
```

Import `materials` from `shaders/std` and use `materials.tintRamp`.

Takes color props and returns rgb. The final tint of a material lit in grey.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `t` | `Expr` |  |
| `dark` | `Expr` |  |
| `light` | `Expr` |  |

## Example

```ts
const rgb = tintRamp(lit, u.darkColor, u.lightColor)
```

## See also

- [`neutralTone`](/docs/primitives/materials/neutraltone) — Compresses bright color back into range without shifting its hue.
- [`cosineRainbow`](/docs/primitives/materials/cosinerainbow) — A smooth rainbow color from a value that wraps every 1.

## Used by

[BrushedMetal](/docs/components/brushedmetal)