---
title: "Apply Color Grading and Video Filters | Rendley SDK Docs"
description: "Apply LUT-based color grading and video filters in the browser. Load built-in presets or import custom LUT files for precise color control with WebGL."
url: https://docs.rendley.com/sdk/getting-started/filters/
---

# Filters

Our [filters](https://docs.rendley.com/sdk/api-reference/classes/Filter.html) use **Lookup Tables (LUTs)**, offering precise control over the color grading process. LUTs are widely used in the cinematic industry and can be exported from tools like Adobe Photoshop.

## Adding filters

Before applying a filter to a clip, you must first add it to the [Library](https://docs.rendley.com/sdk/getting-started/library/):

```
import { Engine } from "@rendley/sdk";

const libraryFilterId = await Engine.getInstance().getLibrary().addFilter({
  id: "randomId",
  name: "filterName",
  lutUrl: "/path/to/lut.jpeg",
  serializable: true,
});
```

Info

The `serializable` property determines whether the filter is included in the serialized state of the project. If set to `false`, you will need to reload the filter during project initialization using the [`onSetupLibrary`](https://docs.rendley.com/sdk/getting-started/library/#handling-missing-assets) callback.

Once added to the Library, the filter can be applied to any clip by referencing its ID:

```
clip.addFilter(libraryFilterId);
```

r.json() ); const first = manifest.filters[0]; const filterId = await Engine.getInstance().getLibrary().addFilter({ id: first.id, name: first.name, lutUrl: filtersRoot + first.path + "lut.png", serializable: true }); clip.addFilter(filterId); await Engine.getInstance().getTimeline().play(); } export { run }; ">

Runnable exampleShow full code

Run

```
// Load a photo and apply the first filter from Rendley's public filter pack.
const mediaId = await Engine.getInstance()
  .getLibrary()
  .addMedia(
    "https://images.pexels.com/photos/24253539/pexels-photo-24253539/free-photo-of-a-bridge-over-a-river-with-a-city-in-the-background.jpeg?auto=compress&cs=tinysrgb&w=1600",
  );

const clip = await layer.addClip({
  mediaDataId: mediaId,
  startTime: 0,
  duration: 5,
});
clip.style.setPosition(960, 540);
clip.style.setScale(0.6, 0.6);

// Fetch the filter manifest and use the first entry.
const filtersRoot = "https://cdn.rendleysdk.com/sdk/assets/filters/";
const manifest = await fetch(filtersRoot + "filters.json").then((r) =>
  r.json(),
);
const first = manifest.filters[0];

const filterId = await Engine.getInstance()
  .getLibrary()
  .addFilter({
    id: first.id,
    name: first.name,
    lutUrl: filtersRoot + first.path + "lut.png",
    serializable: true,
  });

clip.addFilter(filterId);
```

## Removing filters

`removeFilter` takes the filter instance id (returned by `addFilter` on the clip or via `getFilters() [index].getId()`):

```
const instanceId = clip.getFilters()[0].getId();
clip.removeFilter(instanceId);
```

## Adjust filter intensity

To adjust the strength of the applied filter, use the [`setIntensity`](https://docs.rendley.com/sdk/api-reference/classes/Filter.html#setintensity) method:

```
const filter = clip.getFilters()[0];
filter.setIntensity(0.5);
```

Filter intensity is animatable through the [Property Animator](https://docs.rendley.com/sdk/getting-started/property-animator/#animating-effects-and-filters) using the `filter:{instanceId}:intensity` track key.

## What to read next

- **[Effects](https://docs.rendley.com/sdk/getting-started/effects/)** applies GPU shaders like blur, glow and displacement.
- **[Adjustment clips](https://docs.rendley.com/sdk/getting-started/clips/adjustment/)** apply an effect to everything beneath them.
- **[Styling](https://docs.rendley.com/sdk/getting-started/styling/)** positions, scales, rotates and colors a clip.

[Previous pagePlayback speed](https://docs.rendley.com/sdk/getting-started/playback-speed/) [Next pageEffects](https://docs.rendley.com/sdk/getting-started/effects/)
