Accueil Color Gradient Generator

Color Gradient Generator

Pick a start and end color, choose 3–20 steps and get a smooth gradient with every HEX value — 100% in your browser.

Input

Gradient

What is a color gradient?

A color gradient is a smooth transition between two or more colors, produced by interpolating each red, green and blue channel along the way. Web designers use gradients to add depth, direction and visual interest to backgrounds, buttons and illustrations without resorting to flat solid fills. The most common form is a two-color linear gradient, where the start color blends into the end color across a defined number of intermediate steps. Each step is a distinct color whose RGB values sit proportionally between the endpoints — for example, the middle step between #0EA5E9 (sky blue) and #86EFAC (light green) is a muted teal.

Gradients were popularised in CSS through the linear-gradient() and radial-gradient() functions, but the underlying concept is simply a list of colors that the browser blends. This tool generates that list for you so you can either drop it straight into a CSS gradient or hand-pick individual steps for a custom palette.

When to generate a gradient

Generating a gradient up front gives you a ready-made list of colors that you can use in many design contexts. Common scenarios include:

  • CSS backgrounds. Paste the start and end colors into linear-gradient(90deg, #0EA5E9, #86EFAC) for hero sections, cards or buttons.
  • Data visualisation. Map sequential numeric values to gradient steps so that low values use the start color and high values use the end color.
  • Brand transitions. Blend two brand colors to create a recognisable visual signature across hero banners.
  • Illustration and UI. Hand-pick intermediate steps for shadows, highlights or progress bars instead of guessing shades.
  • Accessibility previews. Inspect each step's HEX code to verify contrast against text before applying the gradient.
  • Cross-tool consistency. Export the same step list to Figma, Sketch, Canva or code so every tool uses identical colors.

Because the interpolation is linear in RGB space, the gradient feels even and predictable, which is exactly what most UI uses call for.

Linear RGB interpolation explained

When you ask for N steps between a start color and an end color, this tool computes each step's red, green and blue channels by linear interpolation. For step i out of N (counting from 0), the fraction is t = i / (N - 1), and each channel is start + (end - start) * t, rounded to the nearest integer. The first step is always the start color, the last step is always the end color, and the steps in between are evenly spaced.

Linear RGB interpolation is the simplest and most widely used method. Other color spaces (HSL, OKLab) can produce gradients that look more uniform to the human eye, but for most UI work the differences are subtle and RGB interpolation is what browsers use internally when blending CSS gradients.

Common gradient use cases

The table below shows how different step counts suit different design goals.

StepsBest for
3Minimal hero banners, simple button fills
5Progress bars, subtle brand blends
8Default for most UI gradients
12Data viz heatmaps with smooth transitions
20Fine-grained palettes, photographic-style blends

Pick the smallest step count that still looks smooth — extra steps add visual noise without improving the design.

How to generate a gradient

Generating a gradient with this tool takes only a second and happens entirely inside your browser. No upload, no sign-up, and no installation are required. Follow these steps:

  1. Choose endpoints. Use the two color pickers to set the start and end colors.
  2. Set the step count. Type a number between 3 and 20 into the Steps field.
  3. Review the gradient. The strip and the grid of swatches update in real time, each showing its HEX code.
  4. Copy the codes. Click "Copy All HEX" to copy every step's HEX value, then paste them into your CSS, design tool or code.

Because every step runs locally in your browser using JavaScript, your color choices are never uploaded to a server. This makes gradient generation completely private and instant.

Is this Color Gradient Generator free?

Yes, completely free with no sign-up, no watermarks and no limits.

How many steps can I generate?

Between 3 and 20 steps. The first step is the start color and the last step is the end color.

Which interpolation method does it use?

Linear RGB interpolation — each red, green and blue channel is blended independently between the endpoints.

How do I copy all the colors at once?

Click "Copy All HEX" — every step's HEX value is copied to your clipboard, separated by spaces.

Are my inputs uploaded?

No. All processing is local. Your colors never leave your browser.