Colors
Random Gradient Palette Generator
Used by developers, writers, and creators worldwide.
A random gradient palette generator removes the trial-and-error from pairing CSS background colors, giving you complete linear-gradient definitions you can paste directly into a stylesheet. Set the count to four for a quick scan, or push it higher when you need a broader field to compare. Lock the direction to 135deg for a classic diagonal, choose "to right" for a horizontal sweep, or set it to Random and let the tool decide. Two-stop gradients cover a surprising range of UI work: hero backgrounds, CTA buttons, card overlays, onboarding screens. Each output is a self-contained CSS value with the angle already baked in — no hex math, no vendor prefixes needed for any browser since 2016.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Set the Count field to the number of gradient swatches you want to compare at once.
- Choose a Direction from the dropdown, or leave it on Random to get varied angles across results.
- Click Generate to produce a fresh set of CSS linear-gradient definitions.
- Click any gradient's copy button to grab the full CSS value, ready to paste into your stylesheet or design tool.
- Regenerate as many times as needed — each run produces a completely new set of color combinations.
Use Cases
- •Generating six hero-section background candidates to compare in a Figma frame before committing to a brand direction
- •Quickly styling primary CTA buttons with a directional color sweep using copy-pasted linear-gradient values in styled-components
- •Building a gradient token library in a Tailwind project by dropping outputs into theme.extend.backgroundImage in tailwind.config.js
- •Creating gradient overlays for photography-based card components in a React Storybook to evaluate contrast across light and dark shots
- •Sourcing diagonal gradient fills for app onboarding screens in Figma by transferring the two hex stops into a Linear fill layer
Tips
- →Set Direction to 'to right' when auditing gradients for button backgrounds — horizontal sweeps read most naturally on horizontal UI elements.
- →Generate a batch of eight, screenshot the results, and share with a team for a quick gut-check vote before spending time in code.
- →If you like one color stop from a gradient but not the other, copy the hex you want and rerun — treat generated results as starting points, not final answers.
- →Diagonal gradients at 135deg or 45deg often look more dynamic on hero sections than purely vertical or horizontal ones.
- →Pair a generated gradient with a low-opacity white overlay (rgba(255,255,255,0.15)) to create frosted-glass card effects without losing the color underneath.
- →Avoid using highly saturated two-stop gradients directly behind body text — reserve them for decorative panels, buttons, and borders where text contrast can be managed separately.
FAQ
how do I use a generated gradient in Tailwind CSS
Use Tailwind's arbitrary-value syntax: apply the class bg-[linear-gradient(135deg,#a18cd1,#fbc2eb)] directly in your markup. For reuse across the project, paste the value into theme.extend.backgroundImage inside tailwind.config.js and reference it as a named utility instead.
are css linear gradients from a generator safe to use over text
It depends on the lightness of the two color stops. Pale pastels usually hold enough contrast for dark text, but saturated or dark-stop gradients will need white or near-white text. Run the final pairing through a WCAG contrast checker before shipping — the gradient's midpoint is typically the lowest-contrast zone.
what does the degree number in a linear-gradient actually control
The degree sets the angle of the color transition: 0deg flows bottom to top, 90deg goes left to right, 180deg goes top to bottom, and 135deg produces the popular diagonal sweep. Any value from 0 to 360 is valid, and the named keywords like "to right" or "to bottom right" map to 90deg and 135deg respectively.