1 Gradients
liquibyte edited this page 2026-11-19 16:23:31 -06:00

Gradients

The Gradient tab turns the harmony into a gradient, lets you edit its stops, choose the space its colors are blended in, and compare two blends, and writes the result in 13 formats, from CSS to a GIMP gradient file.

1. The tab

The Gradient tab from top to bottom: the Type, Angle, Interpolation and Direction controls; the gradient strip with its row of stop triangles and midpoint diamonds; the Easing, Opacity, Size, SGL and Reverse controls; two comparison strips; and the format list, the output text and the Copy button

The Gradient tab. The gradient strip and the row of handles under it form the gradient bar; the two comparison strips show the same stops blended two ways.

2. Where the stops come from

The harmony's colors are the stops, sorted by hue and placed in proportion to how their hues are spread on the wheel, so a Paired harmony gives tight pairs of stops. All stops start fully opaque.

A Single harmony has one color, so the gradient gets two stops: your color and an end color chosen by the SGL list: SGL: Auto (a grey whose lightness is the opposite of your color's), SGL: White or SGL: Black.

When the harmony changes (another color, a marker dragged, the triangle moved) the stops take the new colors and positions. When the number of harmony colors changes (another scheme, a new N or number of pairs), the stops are built again from scratch; the type, angle, size, interpolation and direction stay.

3. Editing the stops

On the bar What it does
Click the gradient strip Adds a stop there, in the color the gradient has at that point, selects it, and makes its color the current color. A stop cannot be added at or beyond the first and last stops. A gradient holds up to 32 stops.
Click a stop's triangle Selects the stop. The Easing list shows its easing, and the Opacity value is given to it, so you can set one opacity and click several stops in turn.
Drag a stop Moves it. A stop cannot pass its neighbors.
Right-click a stop, or Delete or Backspace Removes it (the selected one, for the keys). At least two stops always stay.
Drag a diamond Moves the midpoint between two stops, where their colors mix half and half.
Double-click or right-click a diamond Puts the midpoint back in the middle.

The color controls at the top do not edit a single stop. A new current color, whether picked, typed or set with a slider, moves your color's marker on the harmony wheel, and the gradient follows the harmony: every stop takes its harmony color and place again. Selecting a stop does not load its color into the controls.

Stops you add or remove last only until the harmony changes. When the number of stops no longer matches the number of harmony colors, any change to the harmony or the current color builds the stops again from the harmony, and the stops you added are gone.

4. Settings

Control Values (first value) What it sets
Type Linear, Radial (Linear) The shape of the gradient.
Angle 0 to 359° (90) A linear gradient's direction. Dimmed for Radial.
Interpolation OKLCh, OKLab, LCh(ab), L*a*b*, LCh(uv), JzAzBz, CAM16-UCS, sRGB, Linear sRGB, HSL, HSV, Display P3, Adobe RGB, Rec.2020, ACEScg, ProPhoto (OKLCh) The space the colors are blended in. Display P3, Adobe RGB and Rec.2020 blend the values as that space writes them (with its gamma), as CSS does; ACEScg blends in linear light.
Direction Shorter Hue, Longer Hue, CW (Decreasing), CCW (Increasing) (Shorter Hue) Which way round the hue goes from one stop to the next. Only for spaces with a hue (OKLCh, LCh(ab), LCh(uv), JzAzBz, CAM16-UCS, HSL, HSV); dimmed for the others.
Easing Linear, Ease In, Ease Out, Ease In-Out (Linear) How the selected stop blends into the next one.
Opacity 0 to 100 % (100) The selected stop's opacity.
Size 1 to 200 % (100) A radial gradient's size. Dimmed for Linear.
SGL Auto, White, Black (Auto) The end color of a Single harmony's gradient.
Reverse on or off (off) Runs the gradient the other way in the bar and the output.

5. The comparison strips

Under the bar, two strips show the same stops blended two ways, each named above it: the top one in the model chosen in the color model list next to the hex entry, the bottom one in the Interpolation space. Blending in sRGB often turns grey and dull between two saturated colors; OKLCh and the other perceptual spaces keep the colors bright the whole way. The strips show the difference before you choose.

6. Output

Choose a format in the list at the bottom left; the text beside it is the gradient in that format, and Copy puts it on the clipboard. You can also edit the text in the box: Copy copies it as it stands, and the next change to the gradient writes it again.

Format What it gives
CSS4 linear-gradient() or radial-gradient() with the interpolation space and hue direction, for example in oklch shorter hue.
CSS3 The same gradient as plain sRGB stops, for older browsers.
SVG An SVG gradient element.
Stops Only the stops: each color and position.
GLSL, HLSL Shader code.
Unity C# A Unity Gradient.
Godot A Godot 4 gradient.
JSON, JavaScript The stops as data.
Android An Android GradientDrawable in XML.
iOS Swift A CAGradientLayer.
GIMP .ggr The text of a GIMP gradient file.

The gradient also goes to the Design window: it is the strip at the top of the Color Map, ready to drag onto an element of the page.

When Gamut closes it keeps the type, angle, size, interpolation, direction, format and SGL choice, and each stop's position, opacity, easing and midpoint. The stops' colors come from the harmony again at the next start. Reverse is not kept.