0

I am looking to check/enforce that an image is within a certain value range. For a simple example, "does not include #000000 - #111111 hex colors". I am flexible whether this is just a test on an image that says yes/no, a filter that clamps value to this range, plugin, a constraint on palette or any solution really.

Another example range via the red box:

enter image description here

The motivation is to make it easy to follow the style guides for value in a project I'm working on.

I've googled to not much luck. Any suggestions? I'm open to using programs beside Photoshop CC 2015 if needed.

4
  • You looking to restrict yourself of somebody else's PS usage when following the style guide? Because the first one seems unnecessary and the latter seems like the slipperiest of slopes. – Joonas Oct 26 '18 at 7:40
  • Welcome aboard, @Alexander. The only way I can think of to accomplish this would be to create a custom colorspace or ICC profile, then work within that space. Unfortunately, I don't know how to go about creating this. I suggest you consider posting that as a new question. – 13ruce Oct 26 '18 at 12:15
  • I do not understand the application you are looking for. Please expand a bit more to have a more accurate answer. – Rafael Oct 26 '18 at 17:47
  • @Rafael I am looking to check/enforce that an image is within a certain value range. For a simple example, "does not include #000000 - #111111 hex colors". I am flexible whether this is just a test on an image that says yes/no, a filter that clamps value to this range, a constraint on palette or any solution really. – Alexander Mistakidis Oct 27 '18 at 2:18
1

Normal user interface cannot limit the range of selectable RGB colors. You need some underhood knowledge or a third party add-on. Unfortunately those things are out of my range.

One practical way is to use a fixed color palette to choose from. Indexed color mode prevents all adjustments which slide the colors out of the palette. Obviously you have already thought this and seen it useless in your current work.

There's a workaround. You can crunch all colors in an existing image to a limited range with an adjustment layer. It works in Lab color mode. A curves layer where more gentle than 45 degrees lines are placed for L, a and b, flattens the lightness and chromaticity range:

enter image description here

To avoid color hue shifts have the same line for a and b and place them through the midpoint.

In this screenshot there's a screenshot of the color picker in the middle. It's flattened with an curves layer. In the right there's the normal color picker in use. (sorry for inferior screenshots, their colors are not right due too many conversions between our screens)

This method affects equally to all colors, also already in-range colors are flattened.

ADD due the edits in the question:

Try GIMP. It has comprehensive histogram. It literally can show how many pixels have color parameter "value" in the selected range.

enter image description here

Here 11,6% of pixels are darker than the background grey, which has value=128

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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