open source

Color Grading
for React

A fast, lightweight RGB curve editor component.
Like the curves tool in Lightroom, Premiere Pro, and Photoshop.

$ npm install rgb-curve
bundle size npm version license
RGB
R
G
B

Everything you need

Professional color grading in a single React component. Zero dependencies, full control.

4 Channels

Master RGB, Red, Green, and Blue channels. Fine-tune each color independently, just like the pros.

Smooth Interpolation

Monotone cubic spline and Catmull-Rom interpolation. Silky smooth curves without overshoot artifacts.

256-Value LUT

Get a complete Look-Up Table with every change. Ready for real-time pixel processing and image manipulation.

Fully Customizable

Style every aspect with JSON props. Colors, sizes, borders, glows — build the exact look you need.

TypeScript Native

Written in TypeScript from the ground up. Full type definitions, IntelliSense, and type safety out of the box.

~6KB Gzipped

Lightweight with zero runtime dependencies. Only React as a peer dependency. Ship fast, stay lean.

Up and running
in seconds

Import the component, listen for changes, and you're done. The onChange callback gives you both control points and a ready-to-use LUT.

1
Install from npm
2
Import and add to your JSX
3
Use the LUT for pixel processing
App.tsx
import { RGBCurve } from 'rgb-curve';

function App() {
  return (
    <RGBCurve
      width={400}
      height={400}
      onChange={({ points, lut }) => {
        console.log('Points:', points);
        console.log('LUT:', lut);
      }}
    />
  );
}

Make it yours

Every pixel is customizable. Pass a styles prop and build the exact look you want.

RGB R G B

Default Dark

Built-in Lightroom-inspired dark theme

RGB R G B

Neon

Cyberpunk-inspired with glow effects

RGB R G B

Light

Clean and minimal for light interfaces

Props Reference

Simple, well-typed API. Works in both controlled and uncontrolled modes.

Prop Type Default Description
width number 300 Width of the curve editor in pixels
height number 300 Height of the curve editor in pixels
onChange (data) => void Callback with points, LUT, and active channel
defaultPoints ChannelPoints Initial control points for each channel
points ChannelPoints Controlled points (makes component controlled)
styles RGBCurveStyles Custom styles for every visual element
interpolation 'monotone' | 'catmullRom' 'monotone' Curve interpolation algorithm
showTabs boolean true Show/hide the channel selector tabs
showHistogram boolean false Show/hide the histogram overlay
disabled boolean false Disable all user interactions

Ready to grade?

Add professional color grading to your React app in under a minute.