| .. | ||
| README.md | ||
Layer Object Simplified Format
- Input format of
jamLayers.toLayerObject. - Output format of
jamLayers.fromLayerObject.
Used by the following creative scripts:
Simplified format
Defined as a JSON object:
{ "adjustmentLayer": adjustmentLayer }
or
{ "contentLayer": contentLayer }
or
{ "layer": layer }
or
{ "layerSection": layerSection }
adjustmentLayer : JSON object in Layer properties format
contentLayer : JSON object in Layer properties format
layer : JSON object in Layer properties format
layerSection : JSON object in Layer properties format
Layer properties
{
"name": name,
"color": color,
"layerLocking": layerLocking,
"group": group,
"mode": mode,
"opacity": opacity,
"fillNeutral": fillNeutral,
"fillOpacity": fillOpacity,
"channelRestrictions": channelRestrictions,
"knockout": knockout,
"blendInterior": blendInterior,
"blendClipped": blendClipped,
"transparencyShapesLayer": transparencyShapesLayer,
"layerMaskAsGlobalMask": layerMaskAsGlobalMask,
"vectorMaskAsGlobalMask": vectorMaskAsGlobalMask,
"blendRange": blendRange,
"type": type,
"userMaskDensity": userMaskDensity,
"userMaskFeather": userMaskFeather,
"vectorMaskDensity": vectorMaskDensity,
"vectorMaskFeather": vectorMaskFeather
}
name : [optional] string
color : [optional] string (among"none","red","orange","yellowColor","green","blue","violet","gray")
layerLocking : [optional] JSON object in Layer locking format
group : [optional] boolean
mode : [optional] string (among Blend modes)
opacity : [optional] number (percentage; 0% to 100%)
fillNeutral : [optional] boolean
fillOpacity : [optional] number (percentage; 0% to 100%)
channelRestrictions : [optional] JSON array of strings (among Channels)
knockout : [optional;"none"by default] string (among"none","shallow","deep")
blendInterior : [optional] boolean
blendClipped : [optional;trueby default] boolean
transparencyShapesLayer : [optional;trueby default] boolean
layerMaskAsGlobalMask : [optional] boolean
vectorMaskAsGlobalMask : [optional] boolean
blendRange : [optional] JSON array of JSON objects in Blend range format
type : [optional] JSON object in Layer type format (only for"adjustmentLayer"or"contentLayer")
userMaskDensity : [optional] number (percentage; 0% to 100%)
userMaskFeather : [optional] number (0 to 250 pixels)
vectorMaskDensity : [optional] number (percentage; 0% to 100%)
vectorMaskFeather : [optional] number (0 to 250 pixels)
Layer locking
{
"protectAll": protectAll,
"protectComposite": protectComposite,
"protectPosition": protectPosition,
"protectTransparency": protectTransparency
}
protectAll : [optional] boolean
protectComposite : [optional] boolean
protectPosition : [optional] boolean
protectTransparency : [optional] boolean
Blend range
{
"channel": channel,
"srcBlackMin": srcBlackMin,
"srcBlackMax": srcBlackMax,
"srcWhiteMin": srcWhiteMin,
"srcWhiteMax": srcWhiteMax,
"destBlackMin": destBlackMin,
"destBlackMax": destBlackMax,
"destWhiteMin": destWhiteMin,
"destWhiteMax": destWhiteMax
}
channel : string (among Channels)
srcBlackMin : number (0 to 255)
srcBlackMax : number (0 to 255)
srcWhiteMin : number (0 to 255)
srcWhiteMax : number (0 to 255)
destBlackMin : number (0 to 255)
destBlackMax : number (0 to 255)
destWhiteMin : number (0 to 255)
destWhiteMax : number (0 to 255)
Layer type
A layer type can be one of the following:
- Black & white adjustment
- Brightness/contrast adjustment
- Channel mixer adjustment
- Color balance adjustment
- Curves adjustment
- Exposure adjustment
- Gradient map adjustment
- Hue/saturation adjustment
- Invert adjustment
- Levels adjustment
- Photo filter adjustment
- Posterize adjustment
- Selective color adjustment
- Threshold adjustment
- Vibrance adjustment
- Gradient fill
- Pattern fill
- Solid color fill
Black & white adjustment
{
"blackAndWhite":
{
"red": red,
"yellow": yellow,
"green": green,
"cyan": cyan,
"blue": blue,
"magenta": magenta,
"useTint": useTint,
"tintColor": tintColor,
"using": using
}
}
red : [optional] number (-200 to 300)
yellow : [optional] number (-200 to 300)
green : [optional] number (-200 to 300)
cyan : [optional] number (-200 to 300)
blue : [optional] number (-200 to 300)
magenta : [optional] number (-200 to 300)
useTint : [optional] boolean (falseby default)
tintColor : [optional] JSON object in Color format (only if useTint istrue)
using : [optional] adjustment preset file path string (.blw)
Brightness/contrast adjustment
{
"brightnessContrast":
{
"brightness": brightness,
"contrast": contrast,
"useLegacy": useLegacy
}
}
brightness : [optional] number (-100 to 100 if useLegacy is
trueor undefined; -150 to 150 otherwise)
contrast : [optional] number (-100 to 100 if useLegacy istrueor undefined; -50 to 100 otherwise)
useLegacy : [optional] boolean (trueby default)
Channel mixer adjustment
{
"channelMixer":
{
"red": red,
"green": green,
"blue": blue,
"cyan": cyan,
"magenta": magenta,
"yellowColor": yellowColor,
"black": black,
"gray": gray,
"monochromatic": monochromatic,
"using": using
}
}
red : [optional] JSON object in Channel Matrix format
green : [optional] JSON object in Channel Matrix format
blue : [optional] JSON object in Channel Matrix format
cyan : [optional] JSON object in Channel Matrix format
magenta : [optional] JSON object in Channel Matrix format
yellowColor : [optional] JSON object in Channel Matrix format
black : [optional] JSON object in Channel Matrix format
gray : [optional] JSON object in Channel Matrix format (only if monochromatic is
true)
monochromatic : [optional] boolean (
falseby default)
using : [optional] adjustment preset file path string (.cha)
Channel matrix
{
"red": red,
"green": green,
"blue": blue,
"cyan": cyan,
"magenta": magenta,
"yellowColor": yellowColor,
"black": black,
"constant": constant
}
red : [optional] number (-200 to 200)
green : [optional] number (-200 to 200)
blue : [optional] number (-200 to 200)
cyan : [optional] number (-200 to 200)
magenta : [optional] number (-200 to 200)
yellowColor : [optional] number (-200 to 200)
black : [optional] number (-200 to 200)
constant : [optional] number (-200 to 200)
Color balance adjustment
{
"colorBalance":
{
"shadowLevels": shadowLevels,
"midtoneLevels": midtoneLevels,
"highlightLevels": highlightLevels,
"preserveLuminosity": preserveLuminosity
}
}
shadowLevels : [optional] JSON array of numbers (-100 to 100)
midtoneLevels : [optional] JSON array of numbers (-100 to 100)
highlightLevels : [optional] JSON array of numbers (-100 to 100)
preserveLuminosity : [optional] boolean
Curves adjustment
{
"curves":
{
"adjustment": adjustment,
"using": using
}
}
adjustment : [optional] JSON array of JSON objects in Curves adjustment component format
using : [optional] adjustment preset file path string (.acv or .amp)
Curves adjustment component
either:
{
"channel": channel,
"curve": curve
}
or:
{
"channel": channel,
"mapping": mapping
}
channel : string (among Channels)
curve : [optional] JSON array of JSON objects in Point format
mapping : [optional] JSON array of 256 numbers (0 to 255)
Exposure adjustment
{
"exposure":
{
"exposure": exposure,
"offset": offset,
"gammaCorrection": gammaCorrection,
"using": using
}
}
exposure : [optional] number (-20.0 to 20.0; 0.0 by default)
offset : [optional] number (-0.5 to 0.5; 0.0 by default)
gammaCorrection : [optional] number (0.01 to 9.99; 1.0 by default)
using : [optional] adjustment preset file path string (.eap)
Gradient map adjustment
{
"gradientMapClass":
{
"gradient": gradient,
"dither": dither,
"reverse": reverse
}
}
gradient : JSON object in Gradient format
dither : [optional] boolean (falseby default)
reverse : [optional] boolean (falseby default)
Hue/saturation adjustment
{
"hueSaturation":
{
"adjustment": adjustment,
"colorize": colorize,
"using": using
}
}
adjustment : [optional] JSON array of JSON objects in Hue/saturation adjustment component format
colorize : [optional] boolean (falseby default)
using : [optional] adjustment preset file path string (.ahu)
Hue/saturation adjustment component
{
"hue": hue,
"saturation": saturation,
"lightness": lightness
}
or:
{
"channel": channel,
"hue": hue,
"saturation": saturation,
"lightness": lightness
}
or:
{
"localRange": localRange,
"beginRamp": beginRamp,
"beginSustain": beginSustain,
"endSustain": endSustain,
"endRamp": endRamp,
"hue": hue,
"saturation": saturation,
"lightness": lightness
}
hue : number (-180 to 180, or 0 to 360 if colorize is
true)
saturation : number (-100 to 100, or 0 to 100 if colorize istrue)
lightness : number (-100 to 100)
channel : [optional] string (
"composite"; only if colorize istrue)
localRange : [optional] number (1 for reds, 2 for yellows, 3 for greens, 4 for cyans, 5 for blues, 6 for magentas)
beginRamp : [optional] number (0 to 360)
beginSustain : [optional] number (0 to 360)
endSustain : [optional] number (0 to 360)
endRamp : [optional] number (0 to 360)
Invert adjustment
{
"invert": null
}
Levels adjustment
{
"levels":
{
"adjustment": adjustment,
"using": using
}
}
adjustment : [optional] JSON array of JSON objects in Levels adjustment component format
using : [optional] adjustment preset file path string (.alv)
Levels adjustment component
{
"channel": channel,
"input": input,
"gamma": gamma,
"output": output,
"auto": output,
"autoContrast": output,
"autoNeutrals": autoNeutrals,
"autoBlackWhite": autoBlackWhite,
"blackClip": blackClip,
"whiteClip": whiteClip
}
channel : string (among Channels)
input : [optional] JSON array of 2 numbers (0 to 255; [ 0, 255 ] by default)
gamma : [optional] number (0.01 to 9.99; 1.0 by default)
output : [optional] JSON array of 2 numbers (0 to 255; [ 0, 255 ] by default)
auto : [optional] boolean
autoContrast : [optional] boolean
autoNeutrals : [optional] boolean
autoBlackWhite : [optional] boolean
blackClip : [optional] number (0.0 to 9.99; 0.1 by default)
whiteClip : [optional] number (0.0 to 9.99; 0.1 by default)
Photo filter adjustment
{
"photoFilter":
{
"color": color,
"density": density,
"preserveLuminosity": preserveLuminosity
}
}
color : JSON object in Color format
density : [optional] number (1% to 100%; 25% by default)
preserveLuminosity : [optional] boolean (trueby default)
Posterize adjustment
{
"posterize":
{
"levels": levels
}
}
levels : [optional] number (2 to 255; 4 by default)
Selective color adjustment
{
"selectiveColor":
{
"colorCorrection": colorCorrection,
"method": method,
"using": using
}
}
colorCorrection : [optional] JSON array of JSON objects in Color correction format
method : [optional] string (either"absolute"or"relative";"relative"by default)
using : [optional] adjustment preset file path string (.asv)
Color correction
{
"colors": colors,
"cyan": cyan,
"magenta": magenta,
"yellowColor": yellowColor,
"black": black
}
colors : string (among
"reds","yellows","greens","cyans","blues","magentas","whites","neutrals","blacks")
cyan : [optional] number (-100% to 100%; 0% by default)
magenta : [optional] number (-100% to 100%; 0% by default)
yellowColor : [optional] number (-100% to 100%; 0% by default)
black : [optional] number (-100% to 100%; 0% by default)
Threshold adjustment
{
"thresholdClassEvent":
{
"level": level
}
}
level : [optional] number (1 to 255; 128 by default)
Vibrance adjustment
{
"vibrance":
{
"vibrance": vibrance,
"saturation": saturation
}
}
vibrance : [optional] number (-100 to 100; 0 by default)
saturation : [optional] number (-100 to 100; 0 by default)
Gradient fill
{
"gradientLayer":
{
"gradient": gradient,
"type": type,
"angle": angle,
"scale": scale,
"reverse": reverse,
"dither": dither,
"align": align,
"offset": offset
}
}
gradient : JSON object in Gradient format
type : [optional] string (among"linear","radial","angle","reflected","diamond")
angle : [optional] number (-180° to 180°)
scale : [optional] number (percentage; 10% to 150%)
reverse : [optional] boolean (falseby default)
dither : [optional] boolean (falseby default)
align : [optional] boolean (trueby default)
offset : [optional] JSON object in Point format
Pattern fill
{
"patternLayer":
{
"pattern": pattern,
"scale": scale,
"align": align,
"phase": phase
}
}
pattern : JSON object in Pattern format
scale : [optional] number (percentage; 1% to 1000%; 100% by default)
align : [optional] boolean (trueby default)
phase : [optional] JSON object in Point format
Solid color fill
{
"solidColorLayer":
{
"color": color
}
}
color : JSON object in Color format
Color
A color can be one of the following:
- Book color
- CMYK color
- Grayscale
- HSB color
- Lab color
- RGB color
Book color
{
"book": book,
"name": name,
"bookID": bookID,
"bookKey": bookKey
}
or
{
"book": book,
"name": name
}
or
{
"bookID": bookID,
"bookKey": bookKey
}
book : string
name : string
bookID : number
bookKey : string
CMYK color
{
"cyan": cyan,
"magenta": magenta,
"yellowColor": yellowColor,
"black": black
}
cyan : number (percentage; 0% to 100%)
magenta : number (percentage; 0% to 100%)
yellowColor : number (percentage; 0% to 100%)
black : number (percentage; 0% to 100%)
Grayscale
{
"gray": gray
}
gray : number (percentage; 0% to 100%)
HSB color
{
"hue": hue,
"saturation": saturation,
"brightness": brightness
}
hue : number (0° to 360°)
saturation : number (percentage; 0% to 100%)
brightness : number (percentage; 0% to 100%)
Lab color
{
"luminance": luminance,
"a": a,
"b": b
}
luminance : number (0 to 100)
a : number (-128 to 127)
b : number (-128 to 127)
RGB color
{
"red": red,
"green": green,
"blue": blue
}
red : number (0 to 255)
green : number (0 to 255)
blue : number (0 to 255)
Gradient
A gradient can be either a Solid gradient or a Noise gradient.
Solid gradient
{
"name": name,
"gradientForm": "customStops",
"interpolation": interpolation,
"colors": colors,
"transparency": transparency
}
name : string (gradient name) or
null(in input)
interpolation : number (0 to 4096)
colors : JSON array of JSON objects in Color stop format
transparency : JSON array of JSON objects in Transparency stop format
Color stop
{
"location": location,
"midpoint": midpoint,
"type": type,
"color": color
}
location : number (0 to 4096)
midpoint : number (percentage; 0% to 100%)
type : string (among"foregroundColor","backgroundColor","userStop")
color : [optional; only if type is"userStop"] JSON object in Color format
Transparency stop
{
"location": location,
"midpoint": midpoint,
"opacity": opacity
}
location : number (0 to 4096)
midpoint : number (percentage: 0% to 100%)
opacity : number (percentage: 0% to 100%)
Noise gradient
{
"name": name,
"gradientForm": "colorNoise",
"smoothness": smoothness,
"colorSpace": colorSpace,
"minimum": minimum,
"maximum": maximum,
"vectorColor": vectorColor,
"showTransparency": showTransparency,
"randomSeed": randomSeed
}
name : string (gradient name) or
null(in input)
smoothness : number (0 to 4096)
colorSpace : string (among"RGBColor","HSBColorEnum","labColor")
minimum : JSON array of 4 numbers, i.e., three color components (0 to 100) + transparency (0)
maximum : JSON array of 4 numbers, i.e., three color components (0 to 100) + transparency (100)
vectorColor : boolean
showTransparency : boolean
randomSeed : number
Pattern
{
"name": name,
"ID": ID
}
name : string
ID : string (UUID)
Point
{
"horizontal": horizontal,
"vertical": vertical
}
horizontal : number
vertical : number
Blend modes
"normal""dissolve""darken""multiply""colorBurn""linearBurn""darkerColor""lighten""screen""colorDodge""linearDodge""lighterColor""overlay""softLight""hardLight""vividLight""linearLight""pinLight""hardMix""difference""exclusion""subtract""divide""hue""saturation""color""luminosity"
Channels
"a""b""black""blue""cyan""duotone""gray""green""lightness""magenta""monotone""quadtone""red""tritone""yellow"