ok.OK UtilityA LITTLE EVERYDAY MAGIC

Gradient Generator

Generate a two-colour CSS linear gradient from HEX colours and an angle.

Make it your own

How to use Gradient Generator

Build the CSS declaration for a two-colour linear gradient. Choose both endpoint colours and the angle, then use the preview to see the direction of the transition.

  1. Choose the First colour and Second colour.
  2. Set Angle in degrees and select Generate.
  3. Copy or download the CSS declaration after checking the gradient preview.

Example: Choose #152d3b, #d8bc83 and 135° to produce background: linear-gradient(135deg, #152d3b, #d8bc83);

How it works: The output is background: linear-gradient(angledeg, firstColour, secondColour); using the two selected six-digit HEX colours. This creates CSS, not a raster image file.

Understanding the result

The output is a CSS declaration for a two-stop linear gradient, not a downloadable raster image. The angle follows CSS gradient direction.

A calculation you can check

Using #000000, #ffffff and 90° gives background: linear-gradient(90deg, #000000, #ffffff);, a black-to-white horizontal gradient.

What to check before using the answer

  • A gradient can make text contrast vary across its area. Inspect the complete background and content together in the destination layout.

Guidance updated . Methods and corrections

Are my inputs saved?

Your calculation values and selected files are not stored. Recent and saved tools keep tool identifiers; your market preference keeps only its country code in this browser.

Can I switch to a related tool?

Use the grouped tool selector above the form. Each tool has its own URL, and your browser’s Back button returns to the previous tool.

Search the complete directory ESC to close
Your everyday toolkit