Reproduce effect of Photoshop's "Levels"?

In Photoshop I often useLevels to make colors pop by narrowing down the spectrum to just where there is useful color data.

Is there a way to replicate this process in Blender’s compositor, to save me a trip to the 'shop each time?
Thanks in advance.

The curves node has black level and white level controls that do the same thing as the input black and input white sliders in PS. The middle slider is just a gamma control. There’s a gamma node for that, and you can also find it built into the color correction node. The output sliders don’t have a direct equivalent, but you can get the same effect with the curves adjustment in both Blender and PS by sliding the curve endpoints up and down.

Thank you! What’s the best way to use this in conjunction with the histogram to know where the color data begins and ends?

I finally found Blender’s histogram (“T” key in UV/Image Editor) but I’m having a really hard time getting this to work.
The histogram looks robust for some types of use but doesn’t behave like I expected. Instead of looking like a mountain (Photoshop style) with a definite beginning and ending slope, it looks more like a box that somebody threw sand into. And the RGB curves node seems not to be meant for this either.

If for example I want a shadow input level of 60 and a highlight input level of 190, like so:


I have no idea how to replicate the equivalent values in Blender’s compositor or where to plug them in, or how to accurately read the histogram (because I can’t see the definitive starting point and ending point).

These are my best results. Not sure why 0.1 is good for black or why 0.9 is good for white. Not sure why this random curve I made worked better than the others I tried. Still looks a bit too dark and too contrasty. Hmmmm…



Am I trying to force a square peg into a round hole? Should I give up?

That’s the waveform! check it better, you also have histograms in T panel.
in photoshop with a curve you can do the same thing you do with levels, so the same applies to blender curves. Just remember, in PS you have 0-255 values, in blender is 0-1 float values. so if you set 60 in photoshop you should set 60/255 in blender

Histogram is there at the top.


D’oh! OK, that was my dumb oversight. I think I skipped past it the first time I looked because there was only a few pixels of color data showing up and I thought it wasn’t showing anything. Then the waveform was showing something so I jumped to conclusions.


Upon further investigation I realized I had to LClick and drag up to zoom in. I’m guessing this has to do with color bit depth?

Thank you for that tip about dividing 60/255 to get the float value! That will be useful in many areas of Blender.

Now I just have to study up on the difference between Levels and Curves.

I’ve prepared some example images to better explain my problem.
Since in Photoshop the range I adjusted to was 60 to 190, in Blender that would translate to float values of 0.235294117647059 and 0.745098039215686 respectively.

First of all, I will demonstrate that indeed Curves can produce basically the same results as Levels. lsscpp, you are correct. I measured some very slight variance in color values but not noticeable to the human eye. Here is an image to illustrate the (desirable) effects that Photoshop produces with my values:


Now here are the results I get in Blender, which are totally unexpected. I converted to float values as suggested by lsscpp, and tried two different approaches for inputting those values. The first approach was to the X coordinate of the start and end points of the curve. The second follows the advice of J_the_Ninja and uses the black level and white level inputs. The results from both attempts are similar, but neither are what I want, nor do I understand what caused them.


Thanks in advance for any more clues.

Curves node (like everything else in the Blender compositor) is in linear color space, so I don’t think values or curve positions will match Photoshop. Try raising values to the power of 2.2 after dividing by 255.