Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 36 ยท Shapes, Text and Styles

Fills, Strokes, Gradients and Effects in Figma

Style shapes with solid and gradient fills, image fills, stroke position, drop shadows, inner shadows and blurs, and learn the math of opacity and blending with runnable stand-ins.

A shape's look comes from three things: its fills, its strokes and its effects. They live in the right panel of the editor, and each section can hold several layers that stack on top of each other. This lesson covers every type and explains the arithmetic behind opacity and gradients, so the numbers you type are not magic.

Fills

Select a layer and open the Fill section. Press the plus to add a fill; remove with the minus. A layer can have multiple fills, drawn in order from bottom to top. Each fill has a type, chosen from the drop-down beside the color swatch:

  • Solid: one color, entered as hex (such as 4F46E5), RGB, HSL or picked with the eyedropper.
  • Linear gradient: colors blend along a line.
  • Radial gradient: colors blend outward from a center.
  • Angular gradient: colors sweep around a center like a color wheel.
  • Diamond gradient: colors spread in a diamond shape.
  • Image: a picture fills the shape, with modes such as Fill, Fit, Crop and Tile.
  • Video: a looping video plays inside the shape (mostly for prototypes).

Each fill also has its own opacity (0 to 100%) and a blend mode (Normal, Multiply, Screen, Overlay and others). A fill's opacity affects only that fill; the layer's own opacity (in Appearance) affects everything, including strokes and effects.

Editing gradients

Choose a gradient type and the canvas shows handles on the shape. Drag the end handles to change the angle and length; click along the gradient bar to add color stops; select a stop to change its color, opacity and position. Press Shift while dragging for 45 degree angles.

To make a subtle "glass" look, use a white gradient from 40% opacity to 5% opacity over a colored background. Stops keep their own alpha, so you can fade to transparent without a muddy grey.

Strokes

Open the Stroke section and press the plus. The stroke has:

  • Color (a solid or gradient, same as fills).
  • Position: Inside, Center or Outside the shape edge. Inside strokes keep the overall size of a frame unchanged; outside strokes grow it.
  • Weight: thickness in pixels. For rectangles you can set weight per side (top, right, bottom, left) to draw a single underline.
  • Style: Solid or Dash (with dash and gap lengths).
  • Cap and join: how ends and corners look (round, square, miter).
Python Stand-in: how stroke position changes overall size

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

That is why designers use inside strokes for buttons: a 200 by 100 button stays 200 by 100 px wherever the border is added.

Effects

Open Effects and press the plus to add:

Effect What it does
Drop shadow A shadow behind the layer: offset X/Y, blur, spread, color
Inner shadow A shadow inside the edge, like an inset
Layer blur Blurs the layer itself
Background blur Blurs what is behind the layer (frosted glass)
Noise and texture (newer versions) Grain and surface effects

Effects can be stacked: a button might use two drop shadows, one tight and dark and one wide and soft, which looks more natural than a single shadow.

Shadow tips

  • Small blur, small offset for elements close to the surface (cards); large blur, large offset for floating elements (modals).
  • Keep shadow color a darkened, transparent version of the background color rather than pure black at high opacity.
  • Use spread sparingly; a negative spread tightens a shadow.

The math of opacity

Opacity blends a foreground color with the color behind it. For a color channel (0 to 255), the result is: result = alpha ร— foreground + (1 - alpha) ร— background. Below, a stand-in computes the blended color so you can predict what a semi-transparent fill will look like.

Python Stand-in: blending a translucent color

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Indigo at 10% opacity over white is a pale tint, handy for soft backgrounds behind icons. In Figma the same result comes from setting the fill's opacity field to 10.

Gradient interpolation

A gradient is simply a blend that changes along a line. The stand-in below computes colors at several positions between two stops, the way a linear gradient is evaluated.

Python Stand-in: sampling a linear gradient

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real tools may blend in a different color space, and Figma interpolates in RGB, so the midpoint can look slightly muddy for complementary colors. Add an extra stop in between if that bothers you.

Putting it together

A quick recipe for a modern card:

  1. Fill: white, corner radius 16.
  2. Stroke: inside, 1 px, E2E8F0.
  3. Effects: a drop shadow with Y = 4, blur = 12, color black at 8% opacity.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which stroke position leaves a button's overall size unchanged?

    An inside stroke is drawn within the shape's bounds.
  2. 2. Can one layer have more than one fill?

    Add more fills with the plus button; each has its own type, opacity and blend mode.
  3. 3. Which effect blurs what lies behind a layer?

    Background blur creates the frosted glass look.
  4. 4. Blend result for alpha 0.5, foreground 200, background 100?

    0.5 x 200 + 0.5 x 100 = 150.

Summary

  • Layers can have multiple fills (solid, gradient, image, video), strokes and effects.
  • Stroke position (inside, center, outside) changes the occupied size.
  • Drop shadow, inner shadow, layer blur and background blur are the core effects.
  • Opacity and gradients are linear blending, which you can compute by hand.

Next: Typography and Text Styles