# Stroke and Fill

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

**Field:** Design  
**Category:** Design Tools  
**Also known as:** Fill and Stroke, Outline and Fill, Shape Stroke, Shape Fill

## Think of it like

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

## 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

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.

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Vector Graphic](https://learn.benibix.com/term/design/vector-graphic)
- [Anchor Point](https://learn.benibix.com/term/design/anchor-point)
- [Pen Tool](https://learn.benibix.com/term/design/pen-tool)
- [Scalable Vector Graphics (SVG)](https://learn.benibix.com/term/design/scalable-vector-graphics)
- [Icon](https://learn.benibix.com/term/design/icon)
- [Color Gradient](https://learn.benibix.com/term/design/color-gradient)

## Taught in

- [Boolean Operations and Tracing](https://learn.benibix.com/learn/design-design-tools/boolean-operations-and-tracing): Design Tools, 8/12

![Four panels. Anchor points: a curved path with square points on it, one a sharp corner and one smooth with two handle lines. Stroke and fill: the same circle three times, with fill only, stroke only, and both. Image tracing: a blocky pixel shape on the left, an arrow, and the same shape as smooth curves on the right. Resizing constraints: a small frame and a taller frame, with a button pinned to the bottom right corner in both.](https://learn.benibix.com/diagrams/des7-vector-tools.svg)

---

Source: https://learn.benibix.com/term/design/stroke-and-fill
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
