Palette maker

Orange to Blue Gradient: Colors and CSS Codes

An orange to blue gradient runs from warm (dark orange) to cool (azure blue), and it looks best with a lavender stop such as in the middle. The CSS is linear-gradient(135deg, #FF8C00, #8E7CC3, #0077FF).

Type
135°
 

More orange to blue gradients to try

On this page
  1. Color codes
  2. Gray middle
  3. The fix
  4. CSS code
  5. Best Angles and Types: Linear, Radial and Conic
  6. Palettes
  7. Contrast
  8. Where an Orange to Blue Gradient Works Best
  9. Printing
  10. Orange to Blue vs Sunset, Teal and Other Near Neighbors
  11. FAQ

That middle stop matters more than it looks. Orange and blue are opposites, so a straight blend turns gray halfway through. Use the gradient studio above to move the stops, change the angle or switch the type, then copy the CSS. The rest of this page covers exact color codes, the gray-middle fix, contrast and print.

Orange to Blue Gradient Color Codes: HEX, RGB, HSL, CMYK

The three colors behind this page are a saturated orange, a muted violet and a bright azure. Dark Orange leans amber, closer to marigold than to a red-leaning tangerine. Azure Blue is a pure screen blue with a slight tilt toward cyan. Lavender Purple is the quiet one: lighter, softer and far less saturated, which is exactly why it makes a good bridge.

Color HEX RGB HSL CMYK
Dark Orange 255, 140, 0 33°, 100%, 50% 0, 45, 100, 0
Lavender Purple 142, 124, 195 255°, 37%, 63% 27, 36, 0, 24
Azure Blue 0, 119, 255 212°, 100%, 50% 100, 53, 0, 0

The CMYK numbers are plain formula conversions. A real press profile will return different values, especially for the blue, which I come back to in the print section. If you want more shades of the orange end alone, the orange gradient page has them.

Why Orange and Blue Go Gray in the Middle

On the traditional artist’s wheel, orange and blue sit directly opposite each other. When a browser blends two colors, it averages their red, green and blue channels. For these two, the halfway point is (127.5, 129.5, 127.5), which rounds to roughly . That is a flat mid gray, sitting right in the center of your gradient.

What is the plain sRGB midpoint of #FF8C00 and #0077FF closest to?

Averaging the channels gives about 128, 130, 128, which is almost exactly mid gray.

This is arithmetic, not a bug. Painters see the same thing when they mix complements: the result goes brown or gray. A gradient does not mix pigment, but the neutral midpoint comes from the same opposition. You get a bright orange, a dull band, then a bright blue, and the band reads as a gap.

Quick test

Look at the exact center of any two-color gradient. If that spot could pass for a gray wall, the gradient needs another stop.

Fix the Muddy Middle with a Lavender Stop

The easiest repair is a third stop that has a color of its own. works because its hue (255°) sits on the violet route between orange and blue, and it keeps enough saturation to avoid the dead zone. On a fitness app onboarding screen I designed, the first draft had a gray stripe through the middle that looked like a loading error. One lavender stop at 50% removed it.

Three gradient bars with middle swatches: flat gray straight blend, lavender stop, and deep violet stop compared side by side
A lavender middle stop keeps its hue, while a straight orange to blue blend lands on gray.
.hero {
  background: linear-gradient(135deg, #FF8C00 0%, #8E7CC3 50%, #0077FF 100%);
}

Move the middle stop to 40% for more violet and a shorter orange, or to 60% for a longer orange and a tighter blue. A rose bridge like gives a warmer sunset feel, and a deeper violet like gives a moodier one.

The second fix is to change how the browser blends. Modern browsers let you pick the color space, and OKLCH keeps saturation through the transition, so the center usually bends through pink and purple instead of gray. Keep the plain version above it as a fallback for older browsers.

.hero {
  background: linear-gradient(135deg, #FF8C00, #8E7CC3, #0077FF);
  background: linear-gradient(in oklch 135deg, #FF8C00, #0077FF);
}

Two cautions: in oklab still runs close to a straight line and stays fairly neutral, and in hsl without longer hue takes the short way round the wheel, which passes through yellow and green.

Orange to Blue Gradient CSS to Copy

Here are four ready snippets, all built from the same three colors. The first is the bare two-stop version, useful when you want the hard contrast on purpose. The second is the sunset layout, with orange at the bottom and blue overhead. The third is a soft glow, and the fourth loops back to orange so the conic seam disappears.

/* 1. Two stops, left to right */
background: linear-gradient(90deg, #FF8C00, #0077FF);

/* 2. Sunset sky: first color sits at the bottom */
background: linear-gradient(0deg, #FF8C00, #8E7CC3, #0077FF);

/* 3. Radial glow from the top left */
background: radial-gradient(circle at 25% 20%, #FF8C00, #8E7CC3 45%, #0077FF);

/* 4. Conic loop with no visible seam */
background: conic-gradient(from 200deg, #FF8C00, #8E7CC3, #0077FF, #8E7CC3, #FF8C00);

Add background-color: #8E7CC3; above any of these as a safe fallback while the image loads. Stop positions use percentages, so you can write #8E7CC3 40% to shift where the bridge lands.

Best Angles and Types: Linear, Radial and Conic

Angle changes the mood more than people expect. In CSS, 0deg points up, so the first color starts at the bottom. These are the angles I reach for most:

  • 90deg runs left to right, which suits banners, progress bars and wide buttons.
  • 135deg is the diagonal from top left to bottom right, and my default for hero sections and cards.
  • 0deg puts orange at the bottom and blue at the top, which reads as a sky just after sunset.
  • 180deg puts orange at the top, like a warm lamp over a cool floor.

Radial gradients work best as a glow behind a phone mockup or a product shot, with orange at the focal point. Conic gradients suit loaders, color wheels and badge backgrounds. Linear is still the safest choice for full-page backgrounds, because text sits more predictably on it.

Orange to Blue Gradient Color Palettes

These four palettes take the gradient and pair it with supporting colors you can use for buttons, text and backgrounds. Each has five hex codes, so you can paste them straight into a design file or a CSS variable set.

Dusk Studio

Hero sections and app onboarding screens that need warmth and calm together.

Apricot Lagoon

Soft wedding stationery, wellness brands and gentle presentation backgrounds.

Neutral Anchor

Dashboards and landing pages where the gradient is an accent, not the base.

Harbor Sunset

Travel posters, album art and evening-sky illustrations with depth.

Pastel versions are the easiest to live with. Apricot , lilac and sky share a similar lightness, so the blend stays soft and the muddy middle shrinks. For more on the light orange end, see the pastel orange page. If you want a gentler cool partner, the pink and blue palette page shows how a rose tone can bridge the same gap.

Is Text Readable on Orange to Blue? Contrast Ratios

I calculated the WCAG contrast ratios for these colors. The orange and blue ends contrast only 1.77:1 with each other, so do not expect labels to separate them. The more useful numbers are text against each color:

  • Black on : about 9.0:1. White on : about 2.33:1, which fails.
  • Black on : about 5.08:1. White on : about 4.13:1, which misses 4.5:1 for normal text but passes 3:1 for large text.
  • Black on : about 5.82:1. White on : about 3.61:1.

WCAG 2 asks for 4.5:1 on normal text and 3:1 on large text, so black is the only plain text color that passes at both ends. A softer option is , which gives about 5.4:1 on the orange but only about 3.1:1 on the blue, so check the #333333 color against your actual background position.

Which text color passes 4.5:1 on both the orange end and the blue end?

Black reaches about 9.0:1 on the orange and 5.1:1 on the blue, while white fails on orange and #333333 fails on blue.

On a booking app, a white button label sat on the blue end of a gradient like this and failed review. We darkened the blue until the label cleared 4.5:1, and kept the orange for decoration only.

Try this: Put your headline over the gradient and note where it crosses the lavender middle. Test black and white text against . Whichever ratio is higher is the safer color for that spot.

Three orange, lavender and blue swatches with black and white text samples and their WCAG contrast ratios
Black text clears 4.5:1 on all three gradient colors, while white text misses it on every one.

Where an Orange to Blue Gradient Works Best

The pair is energetic, so it earns its place where you want movement and contrast. A few reliable uses:

  • Web and UI: hero banners, onboarding screens, stat cards and gradient borders, with solid dark or light panels carrying the text.
  • Branding: logos and social covers where one color leads. Use blue as the base and orange as the spark, or the reverse.
  • Interiors: an ombré accent wall, or a rug and cushion pair. Keep the orange small and let the blue take the larger surface.
  • Fashion: dip-dyed fabric and sunset-print scarves, where the lavender zone happens naturally.
  • Art and photography: sky backdrops, poster art and album covers, with the diagonal giving a sense of light.

If you want to stay cool throughout, the blue to purple gradient page offers a calmer route, and the black purple gradient page is a good next step for darker, night-time versions of the same idea.

Printing Orange to Blue: What CMYK Does to It

Screens emit light, while ink absorbs it, so the two do not match. Dark Orange converts to roughly 0, 45, 100, 0, which is well within what ink can reproduce, so it prints close to what you see. Azure is a different story: that kind of vivid RGB blue falls outside the CMYK gamut and tends to print deeper and flatter.

I learned this on a brochure cover. The orange matched the screen almost exactly, but the blue on the proof looked a notch duller than the monitor, and the lavender in between shifted slightly toward gray. Since then I soft proof in a press profile before signing off, and I pick a slightly more saturated cyan-leaning blue when I know the job is going to print.

Long gradients can also show banding on some presses and paper stocks. A touch of fine grain or noise in the file hides it. Always ask for a physical proof of any orange to blue gradient before a full run.

Orange to Blue vs Sunset, Teal and Other Near Neighbors

Orange to blue is a high-contrast jump. Orange to red, in comparison, stays warm all the way, and the orange to red gradient page is the better pick if you want glow without the hue shift. Orange to teal, similarly, gets the same opposition but travels through green, which feels more tropical than twilight.

A true sunset gradient adds pink or magenta between the orange and the blue. That is why the “Sunset Sky” and “Neon Dusk” variations above work so well: the middle color is a believable part of the sky, not a patch. Lavender gives a quieter result than rose, so choose lavender for calm brands and rose for entertainment, travel and festival work.

Keep one rule in mind with any variation: let one end dominate. A gradient that gives orange and blue equal weight fights itself, while one that is mostly blue with an orange corner looks deliberate.

The colors behind these gradients

Orange to Blue Gradient: questions people ask

What colors make an orange to blue gradient?

The simplest version runs from #FF8C00 to #0077FF. For a cleaner blend, add a lavender stop such as #8E7CC3 in the middle so the transition keeps its color.

Why is my orange to blue gradient gray in the middle?

Orange and blue are complementary colors, so averaging their RGB channels lands near neutral gray. Add a colored middle stop, or interpolate in OKLCH, to keep the center vivid.

What is the CSS code for an orange to blue gradient?

Use background: linear-gradient(135deg, #FF8C00, #8E7CC3, #0077FF);. Change 135deg to 90deg for left to right, or 0deg to put orange at the bottom like a sunset.

Are orange and blue a good color combination?

Yes. They sit opposite each other on the color wheel, which gives strong contrast and energy. They work best when one color leads and the other accents, or when a bridge color connects them.

What text color is readable on an orange to blue gradient?

Black passes WCAG AA at both ends of the #FF8C00 to #0077FF gradient. White fails on the orange, so for white text put it on a solid dark panel instead.

Keep exploring