← All gradients
35%How it works
JavaScript ↗

JavaScript Gradient

#F7DF1E
#323330
Text readability
Brand Warm Tech

JavaScript Gradient is a warm 2-colour linear gradient that runs from yellow (#F7DF1E) to charcoal (#323330) at 135°. It is inspired by JavaScript’s brand colours, a reference point for tech interfaces. Black text reads best on it, at a contrast ratio of 5.9:1 against the gradient’s average colour (AA). Check every point, not just the average →

Unofficial reference: inspired by JavaScript’s brand colours, which may differ from its official guidelines. The Gradients is not affiliated with or endorsed by JavaScript. JavaScript is a trademark of its owner. The CSS is free to use, but don’t use these colours to make your own product look like JavaScript’s. Terms

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

JavaScript Gradient for SwiftUI, Flutter, Android and more

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

let javascriptGradient = LinearGradient(
    colors: [
        Color(red: 0.969, green: 0.875, blue: 0.118),
        Color(red: 0.196, green: 0.2, blue: 0.188)
    ],
    startPoint: UnitPoint(x: 0, y: 0),
    endPoint: UnitPoint(x: 1, y: 1)
)

// Usage
Rectangle().fill(javascriptGradient)

Colours in the JavaScript Gradient

StopNameHEXRGBHSL
1Yellow#F7DF1Ergb(247, 223, 30)hsl(53, 93%, 54%)
2Charcoal#323330rgb(50, 51, 48)hsl(80, 3%, 19%)

JavaScript Gradient in use

Build something beautifulA hero section on the JavaScript GradientGet started
Button
Card accentAs a border or progress bar
Gradient text

JavaScript 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 JavaScript Gradient?

The JavaScript Gradient uses 2 colours: #F7DF1E and #323330, at an angle of 135°.

How do I use the JavaScript Gradient in CSS?

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

What text colour works on the JavaScript Gradient?

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