What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

precise Lab color color picker


Ninanoki

Well-Known Member
Messages
89
Likes
0
is there any software to read colors of the photo with info panel or color picker witch such details: L:61,18411 ; a:−0,25212 ; b=6,54342
photoshop is not precise, can't such plugin for imagej either.
 
Hi Ninanoki
Yes you can read colors of a photo with 15 bit resolution for all 3 channels of Lab. This can be done with either the eyedropper tool or the color sampler tool and looking at the info panel.

Right click on the measurement value and change it to Lab mode and 16 bit mode

L range is 0 to 32768

a range is -16384 to 16256

b range is -16384 to 16256

Changing to some other scale would just be a math multiplication away.

Note that this level of resolution only makes sense if the image was capture in Raw (14bit camera) or TIFF 16 bit mode and likewise saved in 16 bit mode. If you drop to 8 bit mode at any point along the way, the values will be posterized to 8 bit values.

Not sure this answered your question or not.
 
-so I open RAW/NEF photo in photoshop
-Camera Raw windows I choose ProPhoto RGB 16bits with my camera correct color profile.
-i use color sampler to select color.
-how to convert those values into Lab small values ex: 61,12 ; -0,43 ; 30,32
 
Hi Ninanoki

A bit confused about your question. If you have the info panel open to the color sample values and they are display in Lab and 16 bit as shown in this image:

Screen Shot 2016-12-06 at 11.33.18 AM.png

then to convert from the 15 bit values to the smaller lab values

1) Divide the 15 bit L value by 327.68

2) Divide the "a" and "b" values by 128

That will give you the small Lab values with

L range 0 to 100

a,b values in the range -128 to 127

That is just straight forward mathematical scaling from one range to another.

Hope that helps. If note, add more specific step by step to you post for more clarity on what you did.
 
Last edited:
by using this jsx script my color is set to Lab values:
61,29 ; 0,93 ; 9, 28

after calculations you mentioned above i should get Lab 16 bit values:
L1620048,81
a16-32,27
b16837,21

but color sampler in photoshop says this:
Untitled-2.jpg
what's wrong?


#target photoshop;
var colour = new SolidColor();
colour.lab.l=61.29;
colour.lab.a=0.93;
colour.lab.b=9.28;
app.foregroundColor=colour;

alert("L = " + app.foregroundColor.lab.l +" a = " + app.foregroundColor.lab.a + " b = " + app.foregroundColor.lab.b);
 
Hi Ninanoki

You have interpreted by equation correctly yet you did the math wrong.

Using you numbers and my equation

L: 61.29 *327.68 = 20083.5072 = 20084 (when rounded)

a: 0.93 * 128 = 119.04 = 119 when rounded

b: 9.28 * 128 = 1187.84 = 1188 when rounded

Now with the PS mode set to Lab and 16 bit mode, I ran your exact script and then filled a solid rectangle with the foreground color and placed a couple color samplers in the rectangle (sample size = 1 pixel) and below is the info panel with one sampler set to 16 bit and the other to 8 bit

Exactly as the equation predicted.

I will probably be offline for a while yet I suggest taking everything step by step to find where the error is on your end.

Screen Shot 2016-12-06 at 2.22.03 PM.png
 
Last edited:

Back
Top