Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsCSS Gradient Generator

CSS Gradient Generator

dev

Build linear, radial and conic CSS gradients with a live preview, or paste one to edit

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 17 Oct 2026.

A CSS gradient is an image the browser draws from colour stops: linear-gradient() along a line, radial-gradient() outward from a point and conic-gradient() around a centre. This generator sets the angle and up to 8 stops with a live preview, and reads a pasted gradient back so you can edit it.

Next:
  • Color Converter HEX, RGB, HSL, HWB, OKLCH and CMYK in both directions, with a contrast check

How to make a CSS gradient

1

Pick linear, radial or conic, or start from a preset.

2

Set the angle or direction, then the colour, opacity and position of each stop.

3

Add stops for more colours; two stops at the same position make a hard edge.

4

Copy the background lines into your stylesheet.

About CSS Gradient Generator

Gradients are written as a function with a direction and a list of colour stops. The syntax is short but easy to get wrong, and an existing gradient is hard to adjust by eye. Build one with controls while the preview updates, or paste one from your stylesheet to change it.

The three kinds.

Kind Direction Example
Linear An angle, 0deg up and 90deg right, or a side such as to right Hero backgrounds, buttons
Radial A circle or ellipse around a point Spotlights, vignettes
Conic Around a centre, starting from an angle Pie charts, colour wheels

Each kind also has a repeating form, which tiles the stops; with two pairs of stops at equal positions it draws stripes.

Stops. Each stop has a colour, an opacity and a position along the line from 0 to 100 per cent. Two stops at the same position make a hard edge instead of a blend. The output lists the stops in order of position and leaves out what CSS assumes, such as 180deg for a linear gradient or a centred position.

Reading a pasted gradient. Paste a background or background-image value, or just the function. Angles in deg, turn, rad and grad, side keywords, at positions, hex, rgb() and rgba() colours and the basic colour names are read. Where CSS fills something in, the page does the same and says so: stops without a position are spread evenly, a stop placed before an earlier one moves up to it, and transition hints are dropped.

Fallback. The copied CSS starts with a plain background colour, the first stop, so text stays readable if the gradient is not drawn.

The output was checked with lightningcss, a production CSS parser: 300 generated gradients read exactly like an independently written equivalent, and 15 pasted ones keep their meaning. Nothing leaves your browser.

Frequently asked questions

How does the linear-gradient angle work?

The angle points the gradient line: 0deg goes from bottom to top, 90deg from left to right, 180deg from top to bottom, which is the default, and 270deg from right to left. Positive angles turn clockwise. The keywords to top, to right, to bottom and to left mean exactly 0, 90, 180 and 270 degrees.

How do I make a hard edge in a CSS gradient?

Put two stops at the same position: red 50%, blue 50% switches from red to blue in one line instead of blending. Repeat the trick with repeating-linear-gradient and four stops, such as two colours at 0 to 5 per cent and 5 to 10 per cent, to draw stripes.

What is a conic gradient?

A conic gradient sweeps colours around a centre point, like the hands of a clock, instead of along a line. Positions run from 0 to 100 per cent of a full turn, and from 90deg rotates the starting point. Red, yellow, green, cyan, blue, magenta and red again make a colour wheel.

How do I edit an existing CSS gradient?

Paste the background or background-image value into the box under the controls and press Read. The kind, angle or position and every stop are loaded into the controls, the preview shows it, and any part CSS filled in by itself, such as missing stop positions, is listed so nothing changes without notice.

Can a gradient be transparent?

Yes. Lower the opacity of a stop and the gradient fades into whatever is behind the element. A stop from black at 0 opacity to black at 60 per cent is the usual overlay that keeps white text readable on a photo. The colour is written as rgb() with an alpha value.

Why does my radial gradient look like an oval?

A radial gradient is an ellipse by default, stretched to the element's shape, so on a wide box it looks oval. Choose circle to keep it round whatever the box's proportions. Move the centre with the position controls, for example 30 per cent across and 30 per cent down for a light-source effect.

Sources

  • W3C CSS Images Module Level 3linear- and radial-gradient syntax, angles, side keywords, stop fix-up
  • W3C CSS Images Module Level 4conic-gradient syntax

Last verified 17 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about CSS Gradient Generator and anybody who knows can answer. No account needed.

Common uses

  • CSS Linear Gradient GeneratorPick an angle and colour stops and copy a linear-gradient() background for any element

On the related tools: Cron Expression Generator – Generate a cron expression by choosing when the job should run · Sitemap Index Generator – Split a large site into numbered sitemaps with an index file · Google Analytics URL Builder – The five utm parameters GA4 reads, with the naming traps flagged.

Related tools

All developer tools
UUID GeneratorRandom v4 and time-ordered v7 UUIDs, up to 1,000 at once, plus a validatorHash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512 of text or files, with checksum compareCron Expression BuilderBuild a cron schedule from menus, read it in plain English, see the next runsSlug GeneratorClean URL slugs from titles, including accented and Hindi text, one or hundreds at onceMeta Tag GeneratorWrite title, description, canonical, Open Graph and Twitter tags with a live previewRobots.txt GeneratorBuild a robots.txt with presets, then check what every line really doesSitemap GeneratorTurn a list of URLs into a valid sitemap.xml, with an index when it gets too bigUTM BuilderBuild campaign links with source, medium and campaign, then export the lot as CSV
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)