Blue to Violent Violet Gradient
CSS
background: linear-gradient(90deg, #0000ff 0%, #7f00ff 100%);
From Blue (#0000FF) to Violent Violet (#7F00FF). The two hues are 30° apart on the color wheel, close enough that the blend stays clean without a muddy middle.
Colors along the gradient
| Name | HEX | RGB | HSL | CMYK | |
|---|---|---|---|---|---|
| Blue | #0000FF | 0, 0, 255 | 240°, 100%, 50% | 100, 100, 0, 0 | |
| 25% (near Burning Ultrablue) | #2000FF | 32, 0, 255 | 248°, 100%, 50% | 87, 100, 0, 0 | |
| 50% (near Overdue Blue) | #4000FF | 64, 0, 255 | 255°, 100%, 50% | 75, 100, 0, 0 | |
| 75% (near Electric Indigo) | #5F00FF | 95, 0, 255 | 262°, 100%, 50% | 63, 100, 0, 0 | |
| Violent Violet | #7F00FF | 127, 0, 255 | 270°, 100%, 50% | 50, 100, 0, 0 |
Halfway along, the gradient is #4000FF, closest to the named color Overdue Blue. The stops are mixed in RGB, the way browsers draw a linear gradient by default.
Text on this gradient
White text reads best on both ends, so one text color works across the whole gradient. The two end colors have a contrast ratio of 1.37:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #0000ff, #7f00ff) - Diagonal:
linear-gradient(135deg, #0000ff, #7f00ff) - Radial, from the center out:
radial-gradient(circle, #0000ff, #7f00ff) - Tailwind CSS:
bg-gradient-to-r from-[#0000ff] to-[#7f00ff]
Gradients like this work well for page headers, buttons, cards and slide backgrounds. Keep body text on a solid color for the best readability.
Related gradients
Questions
What are the HEX codes of the Blue to Violent Violet gradient?
It starts at #0000FF (Blue) and ends at #7F00FF (Violent Violet), with #4000FF in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #0000ff, #7f00ff) runs from Violent Violet on the left to Blue on the right.