Gradient
UI DesignWhat is a Gradient
A gradient is a smooth transition between two or more colors. In UI design, gradients add depth, mood and brand character to backgrounds, buttons, cards and illustrations.
Types of Gradients
- Linear: Colors change along a straight line
- Radial: Colors spread out from a center point
- Conic: Colors rotate around a center point
- Repeating: Any of the above repeated as a pattern
When to use Gradients
Use gradients for backgrounds, hero sections, illustrations and brand moments. Subtle gradients can also add depth to surfaces. Avoid strong gradients behind long text or on small controls, where they make text harder to read and states harder to see.
Gradients and contrast
Text on a gradient must have enough contrast against every part of the background, from the lightest to the darkest color. Gradients returned with styles such as glassmorphism and Apple's 2025 app icons, after flat design had removed them.
Frequently asked questions
What types of gradients are there?
The three main types are linear (colors change along a straight line), radial (colors spread out from a center point) and conic (colors rotate around a center point). CSS also has repeating versions of each.
Can you put text on a gradient?
Yes, but check the contrast at the lightest and darkest parts of the gradient, not just the middle. Text must meet 4.5:1 against every part of the background it covers.
When should you use a gradient in UI?
Use gradients for backgrounds, illustrations, brand moments and subtle depth. Keep buttons and text areas simple, so the gradient does not hurt readability or hide which elements are clickable.
Related terms
View all UI Design terms →Color Palette
A color palette is the set of colors a product uses. In UI design, a palette is more than a few swatches. Each color has a role , such as…
Color Theory
Color theory is the study of how colors work together and how they affect what people feel and notice. Designers use it to choose colors…
Glassmorphism
Glassmorphism is a visual style that makes interface panels look like frosted glass . It uses translucency and background blur, usually…
Drop Shadow
A drop shadow is a shadow placed behind an element so it looks raised above the surface. In UI design, drop shadows show depth and help…
Flat Design
Flat Design is a minimalist design approach that emphasizes simplicity by removing decorative elements like gradients, textures, and…
Color Contrast
Color contrast is the difference in brightness between two colors, such as text and its background. It is measured as a contrast ratio…
