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


Ninanoki

Well-Known Member
Messages
89
Likes
0
i'd like to recreate such color in ps. those values are measured by American Dental Association Laboratories and are precise, but the difference between samples is very low (L: 65,73 or 67,21)
1)how can i create such precise color is ps?
L:66,33
a:0,3
b:8,73

when i eyedropped my samples i had 16 bit values of the same sample like this:
L:26975
a:567
b:1339

2)why the difference is so huge?
 
Last edited:
Those 16bit figures look suspect as...
Lab.jpg

You can set the Lab colour directly in the colour picker (foreground or background).
 
I apologise as I was taking it as two values not one. In english and for programming a full stop is used, a comma is used to seperate values.
Yes an interger would be required in Photoshop, but floats can be entered via a script as an example.
Code:
#target photoshop;
var colour = new SolidColor();
colour.lab.l=66.33;
colour.lab.a=0.3;
colour.lab.b=8.73;
app.foregroundColor=colour;

alert("L = " + app.foregroundColor.lab.l +" a = " + app.foregroundColor.lab.a + " b = " + app.foregroundColor.lab.b);
 
I don't want to interrupt here but I've been on a similar quest for color accuracy in PS too.

My searching eventually found this...

http://www.rags-int-inc.com/PhotoTechStuff/ColorCalculator/AdobeMath.html

The sad thing is this article was written nearly 10 years ago but my calculations in my "Gradient Gripe" thread here...

https://www.photoshopgurus.com/foru...linear-gradient-gripe.html?highlight=gradient

...still show all the problems outlined in that article.

To the best of my knowledge, and from my own evidence in the above thread, it doesn't look as if anything has changed since that article was written.....10 years ago!

I've given up on trying to get anything accurate out of photoshop, it just can't do it.

I'll hasten to add though that this "inaccuracy" does only appear to affect Windows machines. Mac users have reported no such errors.....and that article seems to come to this conclusion too.

You may have better luck, but for me Photoshop for Windows is just badly written when it comes to accuracy in colours.

Win 7 x64 Sp1.
PS CC 2014.

Regards.
MrToM.
 
I would swear that a long time ago, someone told the OP that this development effort should not be undertaken in PS, but in a real programming language with full mathematical facilities including double precision floats, if necessary. I can't seem to remember who said that. :banghead: :rofl:

I think the same person also said that the OP needs an imaging / lighting specialist on his team, because even if the numerical precision of the software was superb, even larger sources of error will occur in the lighting and image capture phase. :rolleyes:

Tom M
 
i have a software which uses very precise color measurements but as L,a,b it uses values like L:70,36 ; a:0,92 ;b=14,47.
there are 16 colors in tooth VITA shader. when i take a picture of patients tooth i place on of them near patients tooth and open image in ps. then i'm using color drop to get the L,a,b values like on the image but ps gives me large numbers. how can i calculate large numbers for all 16 shades to keep the difference between them? i attach an excel file.http://dentopolis.org/test/q.xlsx
Untitled-2.jpg
 
This code will display a colorsampler Lab values to 13 decimal places.

Code:
#target photoshop;
app.bringToFront();
///////////////////////////////////////////////////////////
// Requires One Colour Sampler 
///////////////////////////////////////////////////////////
main();
function main(){
if(!documents.length) return;
if(!app.activeDocument.colorSamplers.length);
var mySampler = app.activeDocument.colorSamplers[0];
var result = mySampler.color;
var L = result.lab.l;
var A = result.lab.a;
var B = result.lab.b; 
app.activeDocument.colorSamplers.removeAll();
var win= new Window ('dialog', 'Colour Sampler');
win.st1 = win.add('statictext',undefined,'L = ' + L);
win.st2 = win.add('statictext',undefined,'a = ' + A);
win.st3 = win.add('statictext',undefined,'b = ' + B);
win.p1 = win.add('panel');
win.p1.preferredSize=[100,40];
var r = result.rgb.red/255;
var g = result.rgb.green/255;
var b = result.rgb.blue/255;
var C = win.p1.graphics; var myBrush = C.newBrush(C.BrushType.SOLID_COLOR, [r, g, b, 1]); 
C.backgroundColor = myBrush;
win.bu1 = win.add('button',undefined,'Exit');
win.bu1.onClick=function(){
    win.close(0);
    }
win.show();
};
 
thanks, it works, but strange thing. why the color displayed in this program says that D2 shade is L=70,36 and color drop in ps says L=44,9?q.jpg
 
To be honest I have no idea :cry:
I wonder if you have tried it with different point size samples, does that make a difference?
 
how can i convert excel Lab values into small values like yours in excel?should i simply divide L,a and b by some number?
 
Looking at the figures in the spread sheet:-
L / 164.05596
a / 3200
b / 235.22
These figures then match the top figures.
 
Hello again Ninanoki

First the easy part. How to translate the ~16 bit Lab values to 8bit Lab values in PS

L8 = L16 / 327.68
A8 = A16 / 128
B8 = B16 / 128

Now for the second part and I hope you take this as constructive and not marginalizing. Similar advice has been given by Tom Mann

I believe you are in serious need of expert help if you want the end result of your efforts to be a serious product. I also believe you could be at risk of losing the good will of some of the forum members that are trying to help you. There are experts for hire in the Photoshop Guru forum and there are instructions in the FAQ on how to access them. The multitude of incremental posts and numerous threads on the same basic topic come across to me as not trying to just get friendly advice from experts, yet expert consulting for free.

Recently, you posted another thread on this topic of high accuracy Lab Values and I redirected you back to this thread you initiated as already having the answers. In addition, in your Excel spreadsheet, the approach taken in determining delta E was covered in detail in prior posts in another thread by me. It is almost as if these threads/posts are not being done by the same person. Do we have multiple interns somewhere leveraging the same user name "Ninanoki" in these forums? I don't know how else to explain the multiple threads on the same topic and also backwards progress on previous advice given.

In addition, the reason you are not getting the same match of Lab Numbers with the eye dropper sampler tool was quite apparent with some examination of your image. It is too involved for a short post in the forum and would no doubt exceed friendly advice where expert consulting is actually needed. Leave it to say there is a lack of understanding of the color numbers in color modes, color spaces, Color Management workflow, rendering intents, and whether the applications of interest are properly color managed. This does not even include the nuances of how PS handles color numbers/color spaces (e.g. in RGB color mode, use a Color Sampler and set the Lab numbers. Fill an area on your image. With info panel set to 16 bit check the Lab values of the foreground color chip and the filled area in the image. They will be subtly different and there is a reason). PS is not the best tool to use for your business project.

You can certainly continue to try and take advantage of the free friendly advice, yet for me, I am already at the point where I am not giving advice, yet actually free consulting and feeling taken advantage of. Given that, I bow out of further posts on your business project and hope you hire a consultant to help you.

Note: I am not a moderator or an administrator of the Photoshop Guru forums, so these are all just my own opinion and feelings. Your posts to me, seem outside the scope of the intent of these forums. I am sure a moderator or administrator will correct me if needed as appropriate.

Good luck and best wishes.

John Wheeler
 
so if ps isn't a good software to pick a color from a photo and match with custom shades, does anyone know any alternative software do it? (pick a color in a most precise way, perhaps with L,a,b color mode)?
 
I've said this several times beforehand: The image processing toolbox (add-on) to Matlab.

However, you also need to be able to understand (not just read, and think u understand) the papers I referred you to in an earlier post that pointed out that mixing pigments is a subtractive problem.
 

Back
Top