![]() ![]() The numbers are similar enough with an sRGB profile that I suspect that may be involved with what Color Picker does, but I can't find settings that make it close enough to work. It is really annoying that asking Photoshop to convert an RGB number to LAB in the same document, with the same color settings, gives very different answers depending on where you ask. If I could find out what assumptions (ICC profile, rendering intent, possible rounding) underlie that conversion, I might be able to convert my document to color settings that will make "Convert Color" behave the same as "Color Picker." There is some conversion going on in the Color Picker. You have to know the profile to equate the RGB numbers to real colors. It's equating real, defined colors (LAB) to numbers that represent a different color on every device. It does not make sense to go either direction between RGB and LAB without a color profile. So I need to know how to get the LAB number provided by the "Color Picker" without manually typing every RGB number into the "Color Picker" and writing down the LAB numbers it generates. The LAB numbers provided by "Convert Color" for the same RGB number do not select the colors in the document. Only the LAB number provided by "Color Picker" works to actually select the colors in the document when used with the Color Range function. If I use the scripting function "convert color" to convert the same RGB number to LAB, I get a different LAB number. If I enter an RGB number in "Color Picker," it gives me one set of LAB values. The documents all start off in sRGB as both the working space and the document profile. I've noticed the values seem to be closest to what I get using Convert Color with an sRGB profile in Color Settings, but not close enough to make it work. So, does anyone know what the "Color Picker" does to convert an entered RGB value to LAB, so I can attempt to replicate it and get my selections? However, changing the color settings in Photoshop does make the scripting command "Convert color" return (often wildly) different LAB values for the same RGB number. (Which tells you that what it's doing is fundamentally wrong, because it only makes sense to convert relative values like RGB number to absolute values like LAB numbers through a color profile, and the same RGB equates to different LAB depending on the profile, but that's another story.) If I change my Color Settings in Photoshop, the Color Picker always returns the same LAB value for the same RGB value, regardless. When I use this, I get a different LAB value for the same RGB number than the Color Picker gives. Of course, there's a "Convert color" scripting command. But I need to script the conversion, I can't manually bring up the Color Picker, it defeats the whole purpose. No decimal places on the lab values or anything, just using the whole numbers shown, with the Color Range Min and Max values set to the same LAB value shown and the "Fuzziness" set to 0, it fully selects the exact color needed. If I bring up the "Color Picker" in Photoshop and enter an RGB value I used to separate, and take the LAB values shown in the color picker and put them in the Color Range in the script, it gets a perfect selection every time. (scripting the wand only accepts locations to click, not directly entering color values through scripting) So I have to convert my RGB numbers to LAB values to select the same colors I just used to separate. ![]() To select the colors after indexing, Color Range only accepts LAB colors as arguments. ![]() The scripting command to convert to Index Color seems to only accept RGB values for the colors it will use to index to. I'm writing a script that converts a document to Index color, then makes a selection of each of the colors it was indexed to. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |