• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Lab Color Values in Photoshop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lab Color Values in Photoshop


  • Subject: Lab Color Values in Photoshop
  • From: "Fleisher, Ken" <email@hidden>
  • Date: Tue, 03 Jul 2007 09:43:26 -0400
  • Thread-topic: Lab Color Values in Photoshop

Title: Lab Color Values in Photoshop
Hi. I’m trying to get a list of Lab colors from an image in Photoshop CS2. I am pretty close, but I am getting a discrepancy between my a and b values in my list and the corresponding values in the image. More specifically, I am measuring the colors in the image (which is in Lab mode) using a single pixel eye dropper. I get the Lab values from AppleScript using a single pixel selection and finding the histogram bin that contains a 1. After getting the Lab values through my AppleScript, I am converting them as follows:

set L to L * (100 / 255)
set a to a - 128
set b to b – 128

It is basically working, but there is a difference between my values and the color picker values. I am assuming that this is somehow due to quantization errors, but I can’t figure out which is more correct and what I should use. Also, it doesn’t seem to be consistent for a simple round off error. I am perfectly content with the L values since I can see how they round to the values shown in the color picker. However, the a and b values are integers which don’t match up. The types of differences that I’m seeing are evident in the following two lists:

>From AppleScript:
{{0.0, 0, 0}, {0.0, 0, -12}, {5.098039215686, -17, 8}, {5.098039215686, -16, -4}, {1.960784313725, 15, 3}, {1.960784313725, 16, -9}, {7.058823529412, -1, 11}, {7.058823529412, 0, 0}}

>From the color picker in Photoshop:
{{0,0,0}, {0,1,-12}, {5,-17,8}, {5,-16,-3}, {2,16,3}, {2,17,-8}, {7,-1,12}, {7,0,0}}

Any ideas why there is a discrepancy and which values  are more correct?

Thanks.

--
Ken Fleisher

Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.

Phone: (202) 712-7471
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: is "use rosetta" is checked?
  • Next by Date: Re: is "use rosetta" is checked?
  • Previous by thread: Re: is "use rosetta" is checked?
  • Next by thread: Re: GUI TextEdit (solved)
  • Index(es):
    • Date
    • Thread