strokeStyle - property of the CanvasCtx object
Sets or returns the color or gradient of the line.
- The color value according to CSS
specification. The default value is #000000
- RGB String
(represents a color) is written in the form "#RRGGBB"
. ("#ff0000" - red)
rgb(R,G,B) - RGB color ("rgb(255,0,0)" - red)
rgba(R,G,B,A) - RGBA color ("rgba(255,0,0,0.5)" - red transparent) (4th parameter in the range from 0 to 1)
HTML name color - "red" - named HTML color
- Reference to a gradient object (linear
) used to create a color gradient.
Property access for read and write
This property is also functional in Web panels
variable represents the drawing canvas (CanvasCtx
). The setup is done on the "Draw
" tab at the beginning of the script of drawing event onDraw
ctx.strokeStyle = "#ff0000";