Two colours and one line of CSS can carry a whole hero section. This tool writes that line for you — pick the colours, pick the direction, and copy the background rule straight into your stylesheet.
Try the sample first
- Look at what is already there. “Colour 1” is a terracotta swatch, “Colour 2” is a near-black swatch, “Angle (degrees)” is 135, and “Type” is set to Linear.
- Read the code. The Output box shows background: linear-gradient(135deg, #c08552, #23211e); — the angle first, then the two colours in order.
- Look at the preview. A wide, rounded-corner rectangle fading diagonally from terracotta on the left to near-black on the right. That is what 135 degrees looks like — a diagonal, not straight across.
Change something — then click Generate
- Changing a value does not change the code on its own. Pick a new colour or move the angle slider and the Output box still shows the old gradient until you click “Generate gradient”. The preview stays on the old gradient too, until the same click.
- Try the radial version. Change “Type” to Radial and click “Generate gradient”: the code becomes background: radial-gradient(circle, #c08552, #23211e); and the preview shows a terracotta glow in the centre fading to dark at the edges.
- The angle only matters for linear gradients. In the radial version above there is no angle in the code at all — it just says circle. So if you switch to Radial, the angle slider stops doing anything.
- Angles run like a clock face, roughly. 90 degrees runs left to right, 180 degrees runs top to bottom, and 135 degrees runs diagonally down to the right — the default. Try 0 for a bottom-to-top fade.
- The colour pickers show no hex label. Each swatch is just a colour — pick from it, and read the exact values back from the code, where they appear as #c08552 and #23211e.
- Keep the two colours close for a calm gradient, far apart for a bold one. Two nearby shades of one colour give a soft background; terracotta to near-black, like the default, is a strong statement. If the middle looks muddy, pick colours that are closer together.
- Copy or download it. “Copy output” copies the one line; “Download” saves it as gradient.css. Paste it as the background of any element — a section, a card, or a button.
- Your colours stay on your device. Everything runs in the browser, so nothing you pick is uploaded.