{"content":{"intro":"The CSS Gradient Generator creates a linear gradient between two colours at any angle, shows a live preview, and gives you the CSS to paste straight into your stylesheet.","sections":[["How the angle works","In CSS, 0deg runs from bottom to top, 90deg from left to right, and 180deg from top to bottom. A 135deg gradient runs diagonally from the top-left towards the bottom-right, a popular choice for buttons and backgrounds."],["Avoiding muddy middles","Blending two colours from opposite sides of the colour wheel, like blue and orange, can produce a greyish band in the middle. Picking colours closer together on the wheel, or with similar lightness, gives a cleaner blend."],["Where to use the CSS","Paste the line into the background property of any element. Linear gradients are supported by every modern browser without prefixes."]],"faqs":[{"q":"What colour formats can I use?","a":"Any CSS colour: HEX codes, rgb(…), hsl(…) or named colours like \"teal\"."},{"q":"How do I make a vertical gradient?","a":"Use 180deg for top-to-bottom or 0deg for bottom-to-top."},{"q":"Can I add more than two colours?","a":"Edit the CSS and add more colours separated by commas, such as linear-gradient(135deg, #8b5cf6, #6366f1, #a78bfa)."}]},"sfaq":[{"q":"What does the angle in a CSS gradient control?","a":"It sets the direction the color transition flows: 0deg goes bottom-to-top, 90deg left-to-right, and 180deg top-to-bottom."}],"copy":{"explain":"Your colours, the gradient type and the angle are assembled into a CSS linear-gradient(), radial-gradient() or conic-gradient() function, which you can paste straight into a stylesheet. The preview uses exactly the same CSS.","example":"Opens with a 135° linear gradient from #8b5cf6 to #06b6d4 → background: linear-gradient(135deg, #8b5cf6, #06b6d4);. Tap the Night preset and Radial to get radial-gradient(circle, #0f2027, #203a43, #2c5364), or add up to five colours with &quot;+ Add colour&quot;.","intro":"The CSS Gradient Generator creates linear, radial and conic gradients with two to five colours. Start from a preset like Sunset or Ocean or a random pair, pick colours with a colour picker, set the angle with a slider or direction buttons, and copy the ready-to-use CSS.","sections":[["How the angle works","In CSS, 0deg runs from bottom to top, 90deg from left to right, and 180deg from top to bottom. A 135deg gradient runs diagonally from the top-left towards the bottom-right, a popular choice for buttons and backgrounds. The arrow buttons set the common directions in one tap."],["Linear, radial or conic?","Linear gradients blend along a straight line, radial gradients spread out from the centre like a glow, and conic gradients sweep around a centre point like a colour wheel, useful for pie-chart-style effects."],["Avoiding muddy middles","Blending two colours from opposite sides of the colour wheel, like blue and orange, can produce a greyish band in the middle. Picking colours closer together, or adding a third colour in between, gives a cleaner blend."]],"faqs":[{"q":"What colour formats can I use?","a":"Pick colours with the picker or type HEX, rgb(…) or hsl(…) codes."},{"q":"How do I make a vertical gradient?","a":"Tap ↓ 180° for top-to-bottom or ↑ 0° for bottom-to-top."},{"q":"Can I add more than two colours?","a":"Yes, tap &quot;+ Add colour&quot; for up to five. Tap × next to a colour to remove it."}]},"feat":[["Three gradient types","Linear, radial and conic."],["2 to 5 colours","Pick each with a colour picker."],["Presets","Start from Sunset, Ocean or a random pair."],["Copy the CSS","Ready to paste into your stylesheet."]],"faqx":[{"q":"What is the difference between linear, radial and conic gradients?","a":"A linear gradient blends colours along a straight line at the angle you set. A radial gradient spreads out in a circle from the centre. A conic gradient sweeps colours around the centre like the hands of a clock, which is useful for pie-chart and colour-wheel effects."},{"q":"Which direction does a 135 degree gradient go?","a":"In CSS, 0deg runs from bottom to top and the angle turns clockwise, so 90deg runs left to right and 135deg runs from the top-left corner to the bottom-right. Use the arrow buttons for the common directions or drag the slider for any angle."},{"q":"Why does the angle slider disappear when I choose Radial?","a":"The radial option always makes a circle that starts at the centre, so an angle has no effect and the slider is hidden. For Conic, the angle sets where the colour sweep starts, written as conic-gradient(from 135deg, ...) in the CSS."},{"q":"Can I set where each colour starts, like 30%?","a":"The tool spreads colours evenly. To control positions, copy the CSS and add a percentage after any colour, for example linear-gradient(135deg, #8b5cf6 0%, #06b6d4 30%). The browser blends between the positions you give."},{"q":"How do I remove a colour from the gradient?","a":"When there are three or more colours, an x button appears next to each one. Tap it to remove that colour. A gradient needs at least two colours, so the button is hidden when only two remain."},{"q":"Why does my gradient repeat in stripes down the page?","a":"If the page body is shorter than the screen, the browser repeats the gradient. Add min-height: 100vh to the body, or add background-attachment: fixed, so one gradient fills the whole window."},{"q":"How do I use a gradient on text?","a":"Copy the CSS from the tool onto the text element, then add background-clip: text and -webkit-background-clip: text, and set color: transparent. The gradient then shows through the letters. Bold, large text works best."},{"q":"Do CSS gradients work in all browsers?","a":"Linear and radial gradients work in every modern browser. Conic gradients are supported in current versions of Chrome, Edge, Firefox and Safari, so they are safe for most sites today, though very old browsers will ignore them."}]}