CSS Gradient Generator
Design a two-color gradient, preview it live and copy the code for CSS, Tailwind, SwiftUI or Android XML.
Processed on your device · no uploadCSS
background: linear-gradient(to right, #ff0000, #0000ff);Tailwind CSS
bg-gradient-to-r from-[#ff0000] to-[#0000ff]SwiftUI
LinearGradient(gradient: Gradient(colors: [Color(red: 255 / 255, green: 0 / 255, blue: 0 / 255), Color(red: 0 / 255, green: 0 / 255, blue: 255 / 255)]), startPoint: .leading, endPoint: .trailing)Android XML
<gradient android:angle="0" android:startColor="#ff0000" android:endColor="#0000ff" android:type="linear"/>
How to use Gradient Generator
Pick the colors
Choose the start and end colors.
Set the direction
Adjust the angle and watch the live preview.
Copy the code
Copy the CSS, Tailwind CSS, SwiftUI or Android XML snippet.
Frequently asked questions
How do I use the generated gradient?
Copy the CSS and paste it as the background of any element in your stylesheet.