AppleScript Photoshop CS3 - Get Lab Color Value

Hi,

does anyone know how to get the Lab color value of an image at e.g. pixel x:100 y:150? Im not sure, but i think the easiest way to do this is to make a color sampler and get its properties as a record. I just dont know the correct syntax to make a color sampler and set its position to pixel x,y: make newcolor sampler …fill in text… :wink:

The Photoshop CS3 Scripting Manuel respectively the Photoshop CS3 AppleScript Reference tells me which objects are available, but sadly there are no examples on how to use “color sampler”.

Does anyone know how to do this via color sampler or any other object? Please help! :wink:

tell application "Adobe Photoshop CS3"
    set theFile to choose file with prompt "Choose an image file"
    open theFile
        tell document 1
            make new color sampler... ?
        end tell
    close document 1 saving no
end tell

Hi

Does something like this work for you?

tell application "Adobe Photoshop CS3"
	tell document 1
		change mode to Lab
		set t to make new color sampler with properties {position:{10, 20}}
		return color sampler color of t
	end tell
end tell