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

CSS Linear Gradient Generator

dev

Pick an angle and colour stops and copy a linear-gradient() background for any element

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

A linear gradient blends colours along a straight line. Set the angle, where 0deg points up and 90deg to the right, or pick a side such as to right, then place each colour stop along the line. The preview updates as you drag, and the copied CSS includes a plain background colour first, for the rare browser that cannot draw the gradient.

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

How to use CSS Linear Gradient Generator

1

Set the options you need, or start from the example.

2

The result is made again every time you change something.

3

Copy it or download it. Nothing was sent anywhere.

How CSS Linear Gradient Generator works

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.

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.

The rest of the article, and all 6 questions about CSS Gradient Generator, are on the CSS Gradient Generator page.

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.

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.

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.

More ways to use CSS Gradient Generator

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

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)