| .. | ||
| images | ||
| README.md | ||
Layer Effects Object Simplified Format
- Input format of
jamStyles.toLayerEffectsObject. - Output format of
jamStyles.fromLayerEffectsObject.
Used by the following utility scripts:
Used also by the creative script:
Simplified format
Defined as a JSON object:
{
"scale": scale,
"bevelEmboss": bevelEmboss,
"frameFX": frameFX,
"innerShadow": innerShadow,
"innerGlow": innerGlow,
"chromeFX": chromeFX,
"solidFill": solidFill,
"gradientFill": gradientFill,
"patternFill": patternFill,
"outerGlow": outerGlow,
"dropShadow": dropShadow
}
scale : number (percentage)
bevelEmboss : [optional] JSON object in Bevel and emboss format
frameFX : [optional] JSON object in Stroke format
innerShadow : [optional] JSON object in Inner shadow format
innerGlow : [optional] JSON object in Inner glow format
chromeFX : [optional] JSON object in Satin format
solidFill : [optional] JSON object in Color overlay format
gradientFill : [optional] JSON object in Gradient overlay format
patternFill : [optional] JSON object in Pattern overlay format
outerGlow : [optional] JSON object in Outer glow format
dropShadow : [optional] JSON object in Drop shadow format
Bevel and emboss
{
"enabled": enabled,
"bevelStyle": bevelStyle,
"bevelTechnique": bevelTechnique,
"strengthRatio": strengthRatio,
"bevelDirection": bevelDirection,
"blur": blur,
"softness": softness,
"localLightingAngle": localLightingAngle,
"useGlobalAngle": useGlobalAngle,
"localLightingAltitude": localLightingAltitude,
"transparencyShape": transparencyShape,
"antialiasGloss": antialiasGloss,
"highlightMode": highlightMode,
"highlightColor": highlightColor,
"highlightOpacity": highlightOpacity,
"shadowMode": shadowMode,
"shadowColor": shadowColor,
"shadowOpacity": shadowOpacity,
"useShape": useShape,
"mappingShape": mappingShape,
"antiAlias": antiAlias,
"inputRange": inputRange,
"useTexture": useTexture,
"pattern": pattern,
"phase": phase,
"scale": scale,
"textureDepth": textureDepth,
"invertTexture": invertTexture,
"align": align
}
enabled : boolean (optional in input;
trueby default)
bevelStyle : string (among
"outerBevel","innerBevel","emboss","pillowEmboss","strokeEmboss")
bevelTechnique : string (among"softMatte","preciseMatte","slopeLimitMatte")
strengthRatio : number (percentage; 1% to 1000%)
bevelDirection : string (either"stampIn"or"stampOut")
blur : number (0 to 250 pixels)
softness : number (0 to 16 pixels)
localLightingAngle : number (-180° to 180°)
useGlobalAngle : boolean
localLightingAltitude : number (0° to 90°)
transparencyShape : JSON object in Shaping curve format
antialiasGloss : boolean
highlightMode : string (among Blend modes)
highlightColor : JSON object in Color format
highlightOpacity : number (percentage; 0% to 100%)
shadowMode : string (among Blend modes)
shadowColor : JSON object in Color format
shadowOpacity : number (percentage; 0% to 100%)
useShape : boolean
mappingShape : [optional; only if useShape istrue] JSON object in Shaping curve format
antiAlias : [optional; only if useShape istrue] boolean
inputRange : [optional; only if useShape istrue] number (percentage; 0% to 100%)
useTexture : boolean
pattern : [optional; only if useTexture istrue] JSON object in Pattern format
phase : [optional; only if useTexture istrue] JSON object in Point format
scale : [optional; only if useTexture istrue] number (percentage; 1% to 1000%)
textureDepth : [optional; only if useTexture istrue] number (percentage; -1000% to +1000%)
invertTexture : [optional; only if useTexture istrue] boolean
align : [optional; only if useTexture istrue] boolean
Stroke
{
"enabled": enabled,
"size": size,
"style": style,
"mode": mode,
"opacity": opacity,
"paintType": paintType,
"color": color,
"gradient": gradient,
"reverse": reverse,
"type": type,
"align": align,
"angle": angle,
"dither": dither,
"scale": scale,
"offset": offset,
"pattern": pattern,
"phase": phase,
"scale": scale,
"linked": linked
}
enabled : boolean (optional in input;
trueby default)
size : number (1 to 250 pixels)
style : string (among"outsetFrame","insetFrame","centeredFrame")
mode : string (among Blend modes)
opacity : number (percentage; 0% to 100%)
paintType : string (among"solidColor","gradientFill","pattern")
color : [optional; only if paintType is
"solidColor"] JSON object in Color format
gradient : [optional; only if paintType is
"gradientFill"] JSON object in Gradient format
reverse : [optional; only if paintType is"gradientFill"] boolean
type : [optional; only if paintType is"gradientFill"] string (among"linear","radial","angle","reflected","diamond","shapeburst")
align : [optional; only if paintType is"gradientFill"] boolean
angle : [optional; only if paintType is"gradientFill"] number (-180° to 180°)
dither : [optional; only from CS6; only if paintType is"gradientFill"] boolean
scale : [optional; only if paintType is"gradientFill"] number (percentage; 10% to 150%)
offset : [optional; only if paintType is"gradientFill"] JSON object in Point format
pattern : [optional; only if paintType is
"pattern"] JSON object in Pattern format
phase : [optional; only if paintType is"pattern"] JSON object in Point format
scale : [optional; only if paintType is"pattern"] number (percentage; 1% to 1000%)
linked : [optional; only if paintType is"pattern"] boolean
Inner shadow
{
"enabled": enabled,
"mode": mode,
"color": color,
"opacity": opacit,
"localLightingAngle": localLightingAngle,
"useGlobalAngle": useGlobalAngle,
"distance": distance,
"chokeMatte": chokeMatte,
"blur": blur,
"transparencyShape": transparencyShape,
"antiAlias": antiAlias,
"noise": noise
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
color : JSON object in Color format
opacity : number (percentage; 0% to 100%)
localLightingAngle : number (-180° to 180°)
useGlobalAngle : boolean
distance : number (0 to 30000 pixels)
chokeMatte : number (percentage; 0% to 100%)
blur : number (0 to 250 pixels)
transparencyShape : JSON object in Shaping curve format
antiAlias : boolean
noise : number (percentage; 0% to 100%)
Inner glow
{
"enabled": enabled,
"mode": mode,
"opacity": opacity,
"noise": noise,
"color": color,
"gradient": gradient,
"glowTechnique": glowTechnique,
"innerGlowSource": innerGlowSource,
"chokeMatte": chokeMatte,
"blur": blur,
"transparencyShape": transparencyShape,
"antiAlias": antiAlias,
"inputRange": inputRange,
"shadingNoise": shadingNoise
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
opacity : number (percentage; 0% to 100%)
noise : number (percentage; 0% to 100%)
color : [optional; only if gradient is not defined] JSON object in Color format
gradient : [optional; only if color is not defined] JSON object in Gradient format
glowTechnique : string (either"softMatte"or"preciseMatte")
innerGlowSource : string (either"centerGlow"or"edgeGlow")
chokeMatte : number (percentage; 0% to 100%)
blur : number (0 to 250 pixels)
transparencyShape : JSON object in Shaping curve format
antiAlias : boolean
inputRange : number (percentage; 1% to 100%)
shadingNoise : number (percentage; 0% to 100%)
Satin
{
"enabled": enabled,
"mode": mode,
"color": color,
"opacity": opacity,
"localLightingAngle": localLightingAngle,
"distance": distance,
"blur": blur,
"mappingShape": mappingShape,
"antiAlias": antiAlias,
"invert": invert
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
color : JSON object in Color format
opacity : number (percentage; 0% to 100%)
localLightingAngle : number (-180° to 180°)
distance : number (1 to 250 pixels)
blur : number (0 to 250 pixels)
mappingShape : JSON object in Shaping curve format
antiAlias : boolean
invert : boolean
Color overlay
{
"enabled": enabled,
"mode": mode,
"color": color,
"opacity": opacity
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
color : JSON object in Color format
opacity : number (percentage; 0% to 100%)
Gradient overlay
{
"enabled": enabled,
"mode": mode,
"dither": dither,
"opacity": opacity,
"gradient": gradient,
"reverse": reverse,
"type": type,
"align": align,
"angle": angle,
"scale": scale,
"offset": offset
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
dither : [optional; only from CS6] boolean
opacity : number (percentage; 0% to 100%)
gradient : JSON object in Gradient format
reverse : boolean
type : string (among"linear","radial","angle","reflected","diamond")
align : boolean
angle : number (-180° to 180°)
scale : number (percentage; 10% to 150%)
offset : JSON object in Point format
Pattern overlay
{
"enabled": enabled,
"mode": mode,
"opacity": opacity,
"pattern": pattern,
"phase": phase,
"scale": scale,
"align": align
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
opacity : number (percentage; 0% to 100%)
pattern : JSON object in Pattern format
phase : JSON object in Point format
scale : number (percentage; 1% to 1000%)
align : boolean
Outer glow
{
"enabled": enabled,
"mode": mode,
"opacity": opacity,
"noise": noise,
"color": color,
"gradient": gradient,
"glowTechnique": glowTechnique,
"chokeMatte": chokeMatte,
"blur": blur,
"transparencyShape": transparencyShape,
"antiAlias": antiAlias,
"inputRange": inputRange,
"shadingNoise": shadingNoise
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
opacity : number (percentage; 0% to 100%)
noise : number (percentage; 0% to 100%)
color : [optional; only if gradient is not defined] JSON object in Color format
gradient : [optional; only if color is not defined] JSON object in Gradient format
glowTechnique : string (either"softMatte"or"preciseMatte")
chokeMatte : number (percentage; 0% to 100%)
blur : number (0 to 250 pixels)
transparencyShape : JSON object in Shaping curve format
antiAlias : boolean
inputRange : number (percentage; 1% to 100%)
shadingNoise : number (percentage; 0% to 100%)
Drop shadow
{
"enabled": enabled,
"mode": mode,
"color": color,
"opacity": opacity,
"localLightingAngle": localLightingAngle,
"useGlobalAngle": useGlobalAngle,
"distance": distance,
"chokeMatte": chokeMatte,
"blur": blur,
"transparencyShape": transparencyShape,
"antiAlias": antiAlias,
"noise": noise,
"layerConceals": layerConceals
}
enabled : boolean (optional in input;
trueby default)
mode : string (among Blend modes)
color : JSON object in Color format
opacity : number (percentage; 0% to 100%)
localLightingAngle : number (-180° to 180°)
useGlobalAngle : boolean
distance : number (0 to 30000 pixels)
chokeMatte : number (percentage; 0% to 100%)
blur : number (0 to 250 pixels)
transparencyShape : JSON object in Shaping curve format
antiAlias : boolean
noise : number (percentage; 0% to 100%)
layerConceals : boolean
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
Shaping curve
{
"name": name,
"curve": curve
}
name : [optional; can be omitted if curve is also defined] string
curve : [optional] JSON array of JSON objects in Curve point format
Curve point
{
"horizontal": horizontal,
"vertical": vertical,
"continuity": continuity
}
horizontal : number (0 to 255)
vertical : number (0 to 255)
continuity : boolean (optional;trueby default)
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"
Example
{
"scale": 100,
"dropShadow":
{
"enabled": true,
"mode": "multiply",
"color":
{
"red": 0,
"green": 0,
"blue": 0
},
"opacity": 75,
"localLightingAngle": 135,
"useGlobalAngle": false,
"distance": 10,
"chokeMatte": 5,
"blur": 15,
"transparencyShape":
{
"name": "Linear",
"curve":
[
{
"horizontal": 0,
"vertical": 0
},
{
"horizontal": 255,
"vertical": 255
}
]
},
"antiAlias": false,
"noise": 0,
"layerConceals": true
},
"solidFill":
{
"enabled": true,
"mode": "normal",
"opacity": 100,
"color":
{
"hue": 270,
"saturation": 100,
"brightness": 90
}
}
}