| Language \ Environment \ Comparison |

| Index

| The Processing 1.0 _ALPHA_ Reference is a work in progress. If you see any errors or have any comments, please write to: reas at groupc.net

Name |  | ### stroke()
Examples |  |
    stroke(153);
    rect(30, 20, 55, 55);
    stroke(204, 102, 0);
    rect(30, 20, 55, 55);
Description |  | Sets the stroke color which is the color used to draw lines and borders around shapes. This color is either specified in terms of the RGB or HSB color depending on the current colorMode(). The default color space is RGB, with each value in the range from 0 to 255. The version of stroke() with one parameter specifies a gray value, the version with three parameters specifies a color, and the version with four parameters specifies a color with an alpha value. Note: the value for the parameter "gray" must be less than or equal to the current maximum value as specified by colorMode(). The default value is 255.
Syntax |  |
    stroke(gray)
    stroke(value1, value2, value3);
    stroke(color);
Parameters |  |
gray |  | int or float: specifies a value between white and black
value1 |  | int or float: red or hue value (depending on the current color mode)
value2 |  | int or float: green or saturation value (depending on the current color mode)
value3 |  | int or float: blue or brightness value (depending on the current color mode)
color |  | color: any value of the color datatype
Returns |  | None
Usage |  | Web & Application
Related |  | noStroke() colorMode()

| © 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea |
| Processing is an open project initiated by Ben Fry and Casey Reas |