# How are the levels and curves tools related?

I started to use levels and curves tools quite recently and now I mostly use the second one. Mostly this is due to the fact that I understand the underlied mathematics of curves better than levels. My current understanding of levels is that it is simplified linear version of curves. I mean that those left and right sliders in levels are responsible for the edges of the linear curve like this one

(but strictly linear in between). Am I right? Where can I find a strict mathematical description of levels?

The other version of the question: is it always possible to replace levels by curves? Or there are things which can be done only using levels?

Levels are a special case of curves, where the curve is pinned at both ends and has one control point in between. The two pairs of "input levels" and "output levels" specify the coordinates of the end points of the curve.

The "middle value" specificies the degree of curvature. Levels can only have one radius of curvature, so the curve you posted is not possible using levels. A value greater than 1 means the line is bent outward, a value less than one means it's bent inward. Here's what a levels adjustment would look like in the curves tool:

Curves may have many more control points and can "double back" having negative slope, meaning two or more different input values can reach the same output value (levels is strictly "one to one" from a mathematical point of view). This is not possible using levels:

As such curves are slightly more powerful, but often levels allows you to get to the desired result more quickly as there only five numerical parameters to adjust. Getting exactly the same result in curves is possible but probably requires more clicks.

Yes, you can replace levels with curves. I don't think there is an exact mathematical consistency in the definition of levels, but each level corresponds to a portion of the curve from left to right and will boost or drop it based on the value. I don't know that q factors are published or consistent, but normally they cover roughly 25% of the spectrum with a smooth curve. In Lightroom, I believe you can actually see the impact of the levels on a curve display, but I could be losing my mind.

Generally I use levels if I just need some quick and basic adjustments to a particular region where as I use curves if I need to adjust the exposure curve with more control. I do this since accomplishing the same thing with curves as I can with levels requires multiple control points to be created and requires changes in the interpolation of the curve between control points. (Levels tend to only impact their area and not others where as curves tend to impact the next set of points over.)

A few years late, but I think it contributes. The Curve Tool can directly do anything that the Levels tool can do. And a bit more too, but the curly curved "curve" part is simply one option, but the Curve tool has several other features which directly match Levels. The Curve Tool is perhaps more graphical than Levels, but both show the histogram background.

In Levels, if you move the White Point in (say to 205), then that tone will become the brightest at the 255 end (and the original 206..255 if any will be clipped at 255). If you set the Black Point in (say to 30), then that tone will become the darkest at 0 there (and the original 0..29 if any will be clipped at 0).

In Curves, you can do that same thing, but you can always see a direct graph of the conversion of those numerical tones... of every tone.

It was prepared to answer similar questions very directly, and my site has an example of the several comparable options of Curve and Levels, and specifically how the same things (many same things) shown done by both tools, which IMO can also give a good idea of the features and working of the curve. The idea becomes easy once we realize that both tools are just manipulating the 0..255 response. The Curve response is directly "input this number, and get out that number" (speaking generally, not precisely number for number).

It's too big for here, but you are invited to view it at https://www.scantips.com/lights/curve&levels.html (Edit to correct the renamed page)

Another very late response. The other answers praise the curves, but IMHO still do not fully answer the relation between the two.

The answer depends on how an application implements both, levels and curves.

The initial function of levels is to clip the black and white points (A). This can be translated into a linear curve (red)(B) that is more vertical than the original (pink).

Some applications additionally allow control on the middle gray point (C). This uses a logarithmic gamma curve (D). But not every application has a gamma curve available on the "curves" panel. So, if your application has no gamma curve in the curves panel, this would be an advantage on using levels instead of curves.

Sometimes there is another "levels" slider "Output levels" that would be similar as clipping the vertical values on a curves panel (F). .

Then the middle gray point becomes the relative gray point of the modified gamma curve.