I wanted to be able to replace a range of color with a single flat color.

I'm mostly dealing with black and white / grayscale images.

I tried to use the Curve adjustments tool, but the problem is that it doesn't allow you to create straight lines

Here's a random simple example: Curves

Here I want to do three things:

  1. Replace all colors with values ranging from 0% to 26% with a flat color of 24% value.

  2. Replace all colors with values ranging from 26% to 76% with a flat color of 60% value.

  3. Replace all colors with values ranging from 76% to 100% with a flat color of 89% value.

And by flat color, I mean no gradients, smooth transitions, just a completely flat even color

And as you can see, the curve tool just does not allow me to create straight lines, making it almost impossible to achieve what I want to do

I tried to use a Gradient Map too, but it doesn't allow me to replace the colors I want with flat colors

Is there any fast and practical way for me to achieve that? Preferably in Photoshop, but if it's necessary to use other softwares, I'm open to that.

E D I T:

The type of images I'm working on is grayscaled photographs and realistic paintings

Here is an example of the kind of image I'm working with:

(sorry can't embed, not enough reputation points, see my comment below)

This is what I want to achieve:

enter image description here

To clarify, I don't need it to be the edges to be so clean, neat and well-designed. I'm only using this as a fast and speedy visualization tool, and not to create a final product. So speed is important

  • It would help if we could see the actual image you are attempting to edit, or at least a similar image, and perhaps also post an image which shows the kind of result you want. It's really hard to give advice without seeing it. Also, is the image you are editing a flattened image, or is it a PSD with editable layers?
    – Billy Kerr
    Commented Aug 15, 2017 at 9:21
  • I'm not working on a specific image, but I'll add a random example. i.imgur.com/KSjQ6hl.png i.imgur.com/hCjyGWE.png Generally, the type of picture I'm dealing with is grayscaled photographs and realistic paintings. I'm working with a flattened images. I also clarified my question a bit to make it clearer what I want to achieve
    – gn pan
    Commented Aug 15, 2017 at 9:27
  • Is that the result you are looking for, to take a photograph of a painting, and turn it into a posterization effect?
    – Billy Kerr
    Commented Aug 15, 2017 at 9:32
  • I want a higher degree of control over the value simplification. Posterization just doesn't allow you to do that. I want to be able to very quickly experiment and shift the value range I want to replace, test out different flat values I'm replacing it with, and just generally fast experimentations with the values
    – gn pan
    Commented Aug 15, 2017 at 9:36
  • Have you tried using the Cutout filter? That's probably your best bet. I'm not by my own computer at the moment so can't post an example. But it's located in the artistic filters.
    – Billy Kerr
    Commented Aug 15, 2017 at 9:41

3 Answers 3


Use a Gradient Map to determine your break points and apply colors accordingly. Since you want it flat you'll just need to put in extra points to make hard stops.

enter image description here

Adding a Gradient Map, see how there's green at both ends of that color. You can't tell in the screenshot but there's also identical blues and reds at each end of those colors too (you could also remove the ends entirely and then you only have to worry about any colors in the middle):

enter image description here

Which creates:

enter image description here

  • Thank you so much! But how do you create hard stops?
    – gn pan
    Commented Aug 15, 2017 at 12:19
  • @gnpan just click anywhere on the gradient bar
    – Ryan
    Commented Aug 15, 2017 at 12:37
  • 3
    @gnpan put 2 stops on top of each other
    – joojaa
    Commented Aug 15, 2017 at 18:12

Here's a method you might find helpful. It uses the Cutout filter as discussed in my comments previously, but in conjunction with a Smart Object and Adjustment layers, which should give you some finer control over the conversion of tones to flat areas in the Cutout, with some nice visual feedback to the adjustments as you are making them.

Proceed as follows:

  1. Open an image

  2. Add a black and white adjustment layer if the image is not already black and white.

  3. Add a Levels adjustment layer

  4. Select all the layers in the layers panel, and choose Filter > Convert for Smart Filters.

  5. Apply the Cutout filter.

  6. Double click the Smart Object to open it, and arrange both Windows side by side using Window > Arrange > 2 up Vertical

  7. In the layers panel select the Levels adjustment, and move the sliders.

  8. Each time you adjust the levels hit CTRL+S to save the Smart Object, and the Cutout filter will update in the other window.

Here's an example of the technique working.

Animation of Using Smart Object to make adjustments

Another nice thing about this is that the Cutout Filter is applied non-destructively to the Smart Object, which means you can go in and adjust the number of colour levels, and other sliders in the filter.


Take freeware. Image editor Paint.NET has plugin Curves+ which allows also piecewise linear curves.

Curves+ is a part of Pyrochild plugin package which also is freeware.

enter image description here

NOTE: Paint.NET and its plugins are available from numerous download sites. I recommend to avoid other than the original site https://www.getpaint.net/ because malware pushers use popular freeware to get people hooked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.