How to use this tool
Choose linear or radial, then edit the colors and stop positions. Add or remove stops, adjust the angle or radial shape and position, and try a preset. Valid changes update the preview and CSS immediately; copy the CSS or reset to start again.
How it works
The tool builds a standard CSS linear-gradient or radial-gradient function from validated colors, opacity and positions. Stops are sorted by position with original order preserved for equal positions, so identical stops can create a sharp transition.
A QUICK EXAMPLE
Put it into practice.
A linear gradient at 90° blends from left to right. Place one color at 50% and another at the same 50% to make a sharp edge rather than a smooth blend.
Good to know
Positions are percentages from 0 to 100 and linear angles are 0–360°. This tool generates standard sRGB CSS gradients; different displays may render colors differently. Transparent stops blend against the background behind the gradient. Invalid edits preserve the last valid preview.
Common questions
Can two color stops share a position?
Yes. Their stable order is retained, allowing intentional hard edges such as two colors meeting at 50%.