Gradient Generator
Write a CSS linear-gradient from two hex colors and an angle.
About this tool
The page prints a linear-gradient with the angle and the two color stops you entered. You can paste that declaration into a stylesheet.
It does not draw an image file. The preview on the page is the same CSS.
How to use it
- Enter the two hex colors.
- Set the angle in degrees.
- Build the gradient and copy the CSS.
Limitations
- The result is one linear-gradient. Radial and conic gradients are not generated.
- The colors are hex. Named CSS colors are not parsed.
A CSS line with two hex stops
The string that is built
Both colors are parsed as hex and written back as six-digit hex. The angle defaults to 90 when the field is empty. The result is a CSS linear-gradient function whose first argument is that angle in degrees and whose next two arguments are the two hex colors. There is no third stop, no hint between the stops, and no color-interpolation method named in the string. Radial gradients and conic gradients are not produced. Named CSS colors are not accepted as input. If you have a name, resolve it to hex first.
The preview draws the same two stops in an SVG linear gradient. The angle follows the CSS convention used by the vector math on the page: 0 degrees points up, 90 degrees points to the right. The vector is the sine and the negative cosine of the angle, placed through the center of the box. The preview is a picture of the two stops. It does not precompute intermediate hex values for you to copy. Whatever colors appear between the ends are painted by the gradient, not stored as extra stops.
Interpolation is not a palette
Because the stops are plain hex, a browser paints the ramp in its ordinary handling of those colors, which for this kind of stop is sRGB mixing. The page does not build the ramp in OKLab or in linear light. A midpoint that looks dull or dark is a consequence of that mixing, not a third color the generator chose. If you need an explicit middle hex, blend the two colors at 50 on the blend page and then decide whether to add that hex yourself in your own stylesheet. This generator will not insert it.
Nothing here models print. A CSS gradient on a monitor is not a press blend of inks, and the page has no CMYK branch. Display calibration is not applied. The hex values are passed through as sRGB. An angle outside 0 to 360 is still written into the string if the number parses. CSS will wrap angles. The control on the page is arranged around a full turn, but the text you copy is exactly the number that was read. Copy the function into a stylesheet when you want the ramp. The preview is not a separate file.
Privacy
Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.

