Histogram · levels per channel · monotone curves · auto levels

Levels and Curves Editor

Set black, white and midtone points for the whole picture or one colour channel, bend a curve with draggable points, and watch the histogram before and after. The edit is applied to the full-resolution picture on export, and can also be saved as a 1D .cube LUT.

Picture

A photo or scan to tone

Drop a picture here, paste, or click to choose

PNG, JPG, WEBP, GIF or BMP, up to 25 MB. Pictures over 8192 px on the long side are scaled down.

Levels and Curves Editor

Operator: Abdulla Al Fahad. How tools are built and checked

A flat scan has its darkest pixel at 30 and its brightest at 220, so it uses only 190 of the 256 available tones. Levels stretch that range back to the full scale: set the input black point to 30 and the white point to 220, and a pixel at 125 moves to 161 once a midtone gamma of 1.5 is added. A curve then shapes the contrast inside the range, brightening the shadows or deepening the highlights where levels cannot.

Key features

  • Histograms of the original and the result, with red, green and blue overlaid on the brightness
  • Levels for all channels together or for red, green or blue alone: input black and white points, midtone gamma, output black and white
  • A curve per channel with draggable points, click-to-add, arrow-key nudging, Delete to remove, and a numeric table of the points
  • Curve presets: linear, soft S, strong S, lift shadows, faded blacks and invert

The order of operations, the curve maths and the LUT export

Four controls, RGB and red, green, blue, each have a levels stage and a curve, and they are combined into one 256-entry table per colour channel. For every channel the order is: master levels, channel levels, master curve, channel curve, and the stages are composed in floating point before one rounding, which avoids banding from rounding between stages. Curves use monotone cubic interpolation, so between two points the curve never overshoots them, and a curve through (0, 0), (64, 54), (192, 202), (255, 255) gives 25.8 at input 32 and 230.1 at input 224. The edit changes colour channels independently; it does not alter saturation separately.

How it works

A reduced copy of the picture, at most 1400 px on its long side, is kept in memory and the tables are applied to it each time you change something, which is why the comparison slider reacts as you drag. On download the tables are applied to the full-resolution picture in a worker, so the page stays responsive, and Cancel stops it. The same tables can be saved as a 1D .cube LUT with 256 steps, which video editors that read LUTs can load.

Common use cases

  • A scanned slide has a magenta cast. Auto per channel moves each channel's black and white points separately, and the three histograms line up without touching the curve.
  • A phone photo of a whiteboard is grey. Setting the input white point to 190 and the gamma to 1.4 turns the board white while the marker lines stay dark.
  • A landscape needs a gentle lift: the Soft S preset adds contrast through the midtones, and dragging the lower point up by 10 opens the shadows.

How to use this tool

  1. Open a picture and try Auto contrast, which sets one black and white point from the darkest and brightest channel values.
  2. Fine-tune Levels per channel, using the red, green and blue histograms to judge casts.
  3. Shape contrast in Curves, comparing with the slider.
  4. Download the picture as JPG or PNG, or the LUT.

Example

A scanned slide with a colour cast, each channel covering a different range

Red 40 to 200, green 20 to 180, blue 60 to 239; clipping allowed 0.5% per end

Auto levels

Per channel: red black 40 white 200, green black 20 white 180, blue black 60 white 239
Auto contrast: one pair for all, black 20 white 239

Tips for best results

  • A narrow gap between input black and white points (under about 40 levels) exaggerates noise and banding; stretch less and finish with a curve.
  • Add colour casts in one channel's curve rather than with levels: raising the blue curve's lower-left point by 8 tints shadows blue and leaves the highlights alone.
  • Check the after histogram: a spike at 0 or 255 means pixels clipped, and the Allow-clipping slider in Auto levels controls how many.

Common pitfalls

This works on 8-bit values, so a large stretch of an already compressed JPG can show banding in smooth gradients. Edit a PNG or the least compressed original available.

Common errors and how to fix them

The sliders refuse to cross
The white point must stay at least 2 levels above the black point so the stretch has a valid span. Move the other slider first.

Best practices

  • Do tonal work in Levels first and finish in Curves, because Levels set the range that the curve's points are measured against.

Why the curve is monotone

An ordinary spline through points can swing past them and create tones that were not asked for, brightening a pixel between two dark points. The monotone variant limits the slope at each point so the curve only rises or only falls between neighbours, so nothing overshoots. Presets like Invert, which falls, are handled the same way.

Frequently asked questions

What does gamma above 1 do?

It brightens the midtones while keeping the black and white points where they are: after the stretch, each value x in 0 to 1 becomes x raised to 1 over the gamma, so 0.5 becomes about 0.63 at gamma 1.5.

Is the exported LUT the same as the picture edit?

For colour channels, yes. The adjustment never mixes channels, so a 1D table of 256 steps reproduces it exactly; a viewer that interpolates between those steps may differ by a rounding.

Why are the previews a reduced size?

Reapplying the edit to a 40-megapixel picture on every drag would stall the page, so the preview uses a copy of at most 1400 px and the full picture is processed once, in a worker, when you download.