---
title: "lutAtlasGrade"
description: "Grade a color through a measured 3D color lookup table (LUT), the film-stock look."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.color"
categorySlug: "effects-color"
categoryTitle: "Color effects"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/color.ts#L534"
---

# lutAtlasGrade

Grade a color through a measured 3D color lookup table (LUT), the film-stock look.

```ts
lutAtlasGrade(slots: {
    select: PropRef
    strength: PropRef
    size: number
    decode: (key: string) => Uint8Array
    fallback: string
    label: string
}): (color: Expr, params: FilterParams | GpuFragmentParams) => Expr
```

Import `effects` from `shaders/std` and use `effects.color.lutAtlasGrade`.

Returns a stage `(color, params) => gradedColor` for a `gpu:` fragment, not an `effect:`. `select` is a select prop declared `compileTime: true` that names the table; `decode(key)` returns that table's bytes as RGBA, `size` levels per channel laid out as `size` square slices side by side (red across, green down, one slice per blue level), sRGB in and out. `fallback` is the key used when the prop is unset. `strength` (0–1) fades the graded color over the original. Alpha kept; colors brighter than white grade as white.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    select: PropRef
    strength: PropRef
    size: number
    decode: (key: string) => Uint8Array
    fallback: string
    label: string
}` |  |

## Example

```ts
const grade = lutAtlasGrade({select: p('stock'), strength: p('strength'), size: 17, decode: decodeStockLut, fallback: 'portrait400', label: 'film-lut'})
// then, inside the definition's gpu.fragment: grade(childColor, params)
```

> **Tip.** Changing `select` rebuilds the shader; keep the table list short.

## See also

- [`tint`](/docs/primitives/effects-color/tint) — Wash the child toward one color.
- [`gradientMap`](/docs/primitives/effects-color/gradientmap) — Recolor the child by its brightness through a gradient, the Photoshop gradient map.

## Used by

[FilmStock](/docs/components/filmstock)