← All gradients
35%How it works
Curated

Cotton Candy

#FD79A8
#A29BFE
Text readability
Curated WarmPastel

Cotton Candy is a warm and pastel 2-colour linear gradient that runs from light pink (#FD79A8) to pale blue (#A29BFE) at 135°. It suits hero sections and call-to-action buttons and soft backgrounds, cards and onboarding screens. Black text reads best on it, at a contrast ratio of 8.2:1 against the gradient’s average colour (AAA). Check every point, not just the average →

CSS
background: linear-gradient(135deg, #FD79A8, #A29BFE);
Tailwind
bg-gradient-to-br from-[#FD79A8] to-[#A29BFE]
Figma token
{
    "cotton-candy": {
        "value": "linear-gradient(135deg, #FD79A8 0%, #A29BFE 100%)",
        "type": "color"
    }
}

Cotton Candy gradient for SwiftUI, Flutter, Android and more

The same gradient, same direction, ready for your app or design system.

let cottonCandyGradient = LinearGradient(
    colors: [
        Color(red: 0.992, green: 0.475, blue: 0.659),
        Color(red: 0.635, green: 0.608, blue: 0.996)
    ],
    startPoint: UnitPoint(x: 0, y: 0),
    endPoint: UnitPoint(x: 1, y: 1)
)

// Usage
Rectangle().fill(cottonCandyGradient)

Colours in the Cotton Candy gradient

StopNameHEXRGBHSL
1Light pink#FD79A8rgb(253, 121, 168)hsl(339, 97%, 73%)
2Pale blue#A29BFErgb(162, 155, 254)hsl(244, 98%, 80%)

Cotton Candy gradient in use

Build something beautifulA hero section on the Cotton Candy gradientGet started
Button
Card accentAs a border or progress bar
Gradient text

Cotton Candy gradient variations

Reversed
Horizontal
Radial
Conic
Softer
Deeper
Smooth (OKLCH)
Hard stops

Download as an image

Free PNG wallpapers and backgrounds, drawn in your browser at full resolution.

Frequently asked questions

What are the hex codes for the Cotton Candy gradient?

The Cotton Candy gradient uses 2 colours: #FD79A8 and #A29BFE, at an angle of 135°.

How do I use the Cotton Candy gradient in CSS?

Paste background: linear-gradient(135deg, #FD79A8, #A29BFE); into any element’s styles. For Tailwind, use the class list in the Tailwind block above.

What text colour works on the Cotton Candy gradient?

Black text has the best contrast, at 8.2:1 against the gradient’s average colour, which is AAA. Check the lightest and darkest ends too if text spans the whole gradient.