Screen Ruler Add to Chrome

CSS gradient inspector

See every color stop in any element's gradient laid out on a bar, hover a stop for its exact color and position, and copy the gradient CSS from any website.

What it shows

A CSS gradient packs a direction and any number of color stops into one long function. When the selected element has a gradient background, the side panel adds a Gradients section, titled with the count, for example 2 Gradients. For each gradient you get:

Layered backgrounds with several gradients are split apart, so each one gets its own bar and its own code block.

How to copy a gradient from a website

  1. Open the page with the gradient.
  2. Start Screen Ruler by clicking its toolbar icon or pressing Alt + Shift + S (Option + Shift + S on a Mac).
  3. Click the element with the gradient background. Hero sections, buttons and cards are the usual places. If the section does not appear, the gradient may be on a parent: press Alt + Shift + Up to step up.
  4. In the side panel's Element tab, find the Gradients section.
  5. Hover the pins to read the stops, then click the copy button to copy the background-image declaration.

What it understands

The values come from computed styles, so gradients built from custom properties show up with the variables already resolved.

Limits

When it is useful

Inspect Gradients is part of Screen Ruler's Inspect and Studio plans, and every install starts with a free 7-day trial with everything unlocked, no card needed.

Common questions

How do I copy a CSS gradient from a website?

Start Screen Ruler, click the element with the gradient and open the Gradients section in the side panel. Click the copy button under the gradient to copy its background-image declaration.

Can I see the gradient in DevTools instead?

DevTools shows the gradient as one long value in the Styles pane, which is fine for short gradients. Screen Ruler lays the stops out on a bar with the exact color and position of each one on hover, which is easier to read when a gradient has many stops or implied positions.

Does it work with radial and conic gradients?

Yes. Linear, radial and conic gradients and their repeating versions are all read. The stop bar shows the stops in a straight line, and the copied CSS keeps the original shape and position.

Why are the colors different from the ones in the stylesheet?

The values come from the browser's computed styles. Variables are resolved, named colors become color values and modern color spaces are converted, so the colors may be written differently from the source while looking the same.

Install Screen Ruler for free

No account, no setup. Join 60,000+ developers and designers measuring, inspecting, and editing on any page.

Add to Chrome