Skip to content
BENIBIX Learn

Stroke and Fill

Design🛠️ Design ToolsEditor Features

Also known as Fill and Stroke, Outline and Fill, Shape Stroke, Shape Fill

Fill is the color inside a shape. Stroke is the line around its edge.

Think of it like

It is like a coloring book page. The stroke is the black line, and the fill is the color inside.

Example

Leo draws a star for a badge. He gives it a yellow fill and a thick dark stroke, so it stands out on a busy photo.

Why it matters

Almost every icon, logo and button is a shape. It has a fill, a stroke or both.

Definition

Stroke and fill are the two ways a vector shape is painted. The fill is the color, gradient or pattern inside the shape. The stroke is the line along its edge, with its own color and thickness. Either one can be turned off. An open line, like a squiggle, usually has only a stroke.

Example code

html
<circle cx="50" cy="50" r="40" fill="gold" stroke="black" stroke-width="6" />
This draws a gold circle with a thick black outline.
The same circle with only a fill, only a stroke, and both.

Common mistake

Making a thin stroke for a small icon. When the icon shrinks, the line can vanish.

Key takeaways

  1. 1
    Fill is inside. Color, gradient or pattern.
  2. 2
    Stroke is the edge. Color and thickness.
  3. 3
    Either can be off. Lines need no fill.

Learn it properly