Skip to main content
November 29, 2010
Answered

stroke (strokeColor, width, location, mode, opacity, preserveTransparency)

  • November 29, 2010
  • 1 reply
  • 511 views

Hello,
I can not solve this error message: "Color is undefined." This error throws me in the line method "stroke". Thank you

...
docRef.selection.select(hraniceVizitky)
var farbaCervena = new SolidColor
farbaCervena.rgb.red = 255
farbaCervena.rgb.blue = 0
farbaCervena.rgb.green = 0

docRef.selection.stroke (farbaCervena , 5, StrokeLocation.INSIDE, Color.BlendMode.NORMAL, 100, false)  //Color is undefined
...

This topic has been closed for replies.
Correct answer Muppet_Mark-QAl63s

You are missing a little syntax…

var farbaCervena = new SolidColor(); farbaCervena.rgb.red = 255; farbaCervena.rgb.blue = 0; farbaCervena.rgb.green = 0; var docRef = app.activeDocument; docRef.selection.stroke (farbaCervena, 5, StrokeLocation.INSIDE, ColorBlendMode.NORMAL, 100, false);

And a full stop where not needed… ColorBlendMode not Color.BlendMode

1 reply

Muppet_Mark-QAl63s
Muppet_Mark-QAl63sCorrect answer
Inspiring
November 29, 2010

You are missing a little syntax…

var farbaCervena = new SolidColor(); farbaCervena.rgb.red = 255; farbaCervena.rgb.blue = 0; farbaCervena.rgb.green = 0; var docRef = app.activeDocument; docRef.selection.stroke (farbaCervena, 5, StrokeLocation.INSIDE, ColorBlendMode.NORMAL, 100, false);

And a full stop where not needed… ColorBlendMode not Color.BlendMode

November 29, 2010

I had an error in the argument Color.BlendMode. Thank you