Rainbow Colors

Export

Code

/* Rainbow Colors — colorset.net */
:root {
  --color-1: #FF0000;
  --color-2: #FF7F00;
  --color-3: #FFFF00;
  --color-4: #00FF00;
  --color-5: #0000FF;

  --color-bg: #F7F8E9;
  --color-surface: #EEEFE0;
  --color-border: #D5D7C4;
  --color-text: #344C7F;
  --color-muted: #5E6A82;
  --color-primary: #0000FF;
  --color-on-primary: #FFFFFF;
  --color-accent: #797900;
  --color-on-accent: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #080F1F;
    --color-surface: #11192A;
    --color-border: #242E42;
    --color-text: #F6F8D2;
    --color-muted: #8B8C71;
    --color-primary: #1653FF;
    --color-on-primary: #FFFFFF;
    --color-accent: #FFFF00;
    --color-on-accent: #080F1F;
  }
}

Color values

ColorHEXRGBHSLOKLCH
1
2
3
4
5

Roles & contrast

Original colors are kept; roles are adjusted only when needed for contrast.

RoleLight modeDark mode
Backgroundadjusted for contrast · from #FFFF00adjusted for contrast · from #0000FF
Surfacederivedderived
Borderderivedderived
Textadjusted for contrast · from #0000FFadjusted for contrast · from #FFFF00
Muted textderivedderived
Primaryfrom palette · color 5adjusted for contrast · from #0000FF
On primaryderivedderived
Accentadjusted for contrast · from #FF7F00from palette · color 3
On accentderivedderived

Contrast

Light mode
PairSampleRatioWCAG
Text on background7.87:1AAA pass 4.5:1
Text on surface7.26:1AAA pass 4.5:1
Muted text on background5.07:1AA pass 4.5:1
Label on primary8.59:1AAA pass 4.5:1
Label on accent4.62:1AA pass 4.5:1
Primary on background8.00:1AAA pass 3:1
Accent on background4.30:1AA Large pass 3:1
Dark mode
PairSampleRatioWCAG
Text on background17.55:1AAA pass 4.5:1
Text on surface16.11:1AAA pass 4.5:1
Muted text on background5.54:1AA pass 4.5:1
Label on primary5.65:1AA pass 4.5:1
Label on accent17.80:1AAA pass 4.5:1
Primary on background3.38:1AA Large pass 3:1
Accent on background17.80:1AAA pass 3:1

Every color on every color

Rows are backgrounds and columns are text colors, using the actual palette colors. Ratios: AAA 7:1, AA 4.5:1, AA large text 3:1.

Every color on every color
Background / Text#FF0000 (Text 1)#FF7F00 (Text 2)#FFFF00 (Text 3)#00FF00 (Text 4)#0000FF (Text 5)
#FF0000Same color1.58—3.72AA Large2.91—2.15—
#FF7F001.58—Same color2.36—1.85—3.39AA Large
#FFFF003.72AA Large2.36—Same color1.28—8.00AAA
#00FF002.91—1.85—1.28—Same color6.26AA
#0000FF2.15—3.39AA Large8.00AAA6.26AASame color

How to read contrast ratios (WCAG guide)

Shades

Shades and tints (50–950)

#FF0000#FF7F00#FFFF00#00FF00#0000FF

Variations

About Rainbow Colors

No single hue dominates Rainbow Colors: red carries about 20% of the color weight, shared with yellow and green, and vivid orange #FF7F00 sits in the middle of the range. A 154° hue spread puts pale yellow against vivid blue #0000FF, close to a complementary contrast. Lightness spans 45% (#0000FF) to 97% (#FFFF00), a moderate range; text roles may need slight darkening for full contrast. Saturation is high (mean OKLCH chroma 0.253, peaking at 0.313 in #0000FF); the colors feel saturated and energetic. Text contrast reaches 7.9:1 in light mode and 17.5:1 in dark mode, with #0000FF as primary and #797900 as accent. Try it for marketing pages, brand systems with many sub-brands and data visualization, letting vivid blue #0000FF carry the key actions.

Rainbow Colors color palette: #FF0000, #FF7F00, #FFFF00, #00FF00, #0000FF
Share image for Rainbow Colors

Gradients in similar colors