Copy link to clipboard
Copied
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!
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)
Copy link to clipboard
Copied
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)