Color Converter
Convert colours between HEX, RGB and HSL and preview lighter and darker shades.
A gradient is a background image generated by the browser from a short rule. It needs no image files, scales to any size and can be changed with one value.
A linear gradient runs along a line: linear-gradient(135deg, #ff7e5f, #feb47b). The angle is measured clockwise from the top: 0deg points up, 90deg right, 180deg down.
A radial gradient spreads from a point: radial-gradient(circle at 50% 50%, #ff7e5f, #feb47b). You can move the centre and change the shape.
Each colour can carry a position: linear-gradient(90deg, red 0%, blue 50%, green 100%). Without positions the browser distributes them evenly. Hard stops are made by giving two colours the same position: red 50%, blue 50%.
A background can hold several gradients stacked, separated by commas, with the first painted on top. Combined with transparency this produces stripes, glows and mesh-like effects without images.
Gradients are cheap, but a very large blurred radial gradient over a scrolling page can cost painting time on low-end devices. For a static hero section it is fine; for a full-page animated background, test on a phone.
The most common mistake is too much contrast. Two close hues with a soft angle usually look more professional than a rainbow. If the gradient sits behind text, check the contrast ratio at both ends.
A conic gradient sweeps around a centre point rather than across the box: conic-gradient(from 0deg, red, blue, red). They are the basis of pie charts, colour wheels and many "glass" effects. Hard stops — two colours at the same position — turn any gradient into crisp stripes without a repeating background image.
Layering is the other useful trick: several gradients with transparency stacked in one background rule produce glows, grain and mesh effects that would otherwise need image files. Keep the number of layers small; each one is painted separately.
Generate the rule with the CSS gradient generator, then paste it into your stylesheet.