🖼️ Image preloads for web are now available. Get your images faster! See draw_image for more details.

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for set_stroke

Set the stroke color. This is part of the reference section.

Purpose

Set the color to use for drawing outlines for shapes and figures as well as lines.

Snippet

Set stroke to a blue color.
sketch.set_stroke('#0000C0')

Parameters

  • color: Name of the color or a hex code.

Examples

Availability

Available on all platforms. Currently only hex codes are officially supported.

See also