Skip to main content
Participant
May 10, 2021
Answered

Hue/Saturation Layer In Extendscript

  • May 10, 2021
  • 1 reply
  • 1098 views

I was wondering if anyone knows a way to get the  current hue saturation and lightness values from a hue/saturation layer in extendscript. I want a user to be able to adjust the HSL in a Hue/Saturation adjustment layer and then have extendscript do something with those values, but I have yet to find a way to read those values in extendscript

 

Thanks!

This topic has been closed for replies.
Correct answer jazz-y
quote

but I have yet to find a way to read those values in extendscript


By @Chad5CDD
#target photoshop
s2t = stringIDToTypeID;

(r = new ActionReference()).putProperty(s2t('property'), p = s2t('adjustment'));
r.putEnumerated(s2t('layer'), s2t('ordinal'), s2t('targetEnum'));
var rawData = executeActionGet(r).getList(s2t('adjustment')).getObjectValue(0).getData(s2t('legacyContentData')),
    settings = [];
for (var i = 0; i < rawData.length; i++) { settings[i] = rawData.charCodeAt(i) }
alert(settings)

 

1 reply

jazz-yCorrect answer
Legend
May 10, 2021
quote

but I have yet to find a way to read those values in extendscript


By @Chad5CDD
#target photoshop
s2t = stringIDToTypeID;

(r = new ActionReference()).putProperty(s2t('property'), p = s2t('adjustment'));
r.putEnumerated(s2t('layer'), s2t('ordinal'), s2t('targetEnum'));
var rawData = executeActionGet(r).getList(s2t('adjustment')).getObjectValue(0).getData(s2t('legacyContentData')),
    settings = [];
for (var i = 0; i < rawData.length; i++) { settings[i] = rawData.charCodeAt(i) }
alert(settings)