graf1x

Purple and Yellow

Triadic color combination with 8.77:1 contrast ratio

#800080
#FFFF00

Color Values

Purple
HEX #800080
RGB 128, 0, 128
HSL 300, 100%, 25%
Yellow
HEX #FFFF00
RGB 255, 255, 0
HSL 60, 100%, 50%

Harmony: Triadic

These colors are roughly 120 degrees apart on the wheel — a triadic relationship that stays lively without clashing. Triadic schemes work best when one color dominates and the other two act as accents.

The hue angle between Purple and Yellow is 120 degrees. You can explore these relationships interactively in our Color Wheel Tool.

WCAG Contrast

8.77:1
Purple background with Yellow text
AAA all sizes

UI Preview

Purple surface

Sample text on a purple background demonstrates readability and visual hierarchy.

Yellow surface

Sample text on a yellow background demonstrates readability and visual hierarchy.

Design Tokens

CSS Variables

:root {
  --color-a: #800080;
  --color-b: #FFFF00;
  --color-a-rgb: 128, 0, 128;
  --color-b-rgb: 255, 255, 0;
}

JSON

{
  "name": "Purple and Yellow",
  "colors": [
    {
      "name": "Purple",
      "hex": "#800080",
      "rgb": [
        128,
        0,
        128
      ]
    },
    {
      "name": "Yellow",
      "hex": "#FFFF00",
      "rgb": [
        255,
        255,
        0
      ]
    }
  ],
  "harmony": "Triadic",
  "contrastRatio": 8.77
}

Explore These Colors

Frequently Asked Questions

Do purple and yellow go together?

Yes. Purple and Yellow form a triadic color combination. These colors are roughly 120 degrees apart on the wheel — a triadic relationship that stays lively without clashing. Triadic schemes work best when one color dominates and the other two act as accents. The pairing has a WCAG contrast ratio of 8.77:1, which passes AA for large text and UI components.

What is the contrast ratio between purple and yellow?

The WCAG 2.1 contrast ratio between Purple (#800080) and Yellow (#FFFF00) is 8.77:1. This passes AAA for all text sizes.

How do I use purple and yellow in design?

A safe starting point is the 60/30/10 rule: give one color about 60 percent of the surface area, the other about 30 percent, and reserve the remaining 10 percent for an accent or neutral. If one color is significantly darker, use it for text or structural elements and the lighter one for backgrounds. Test the result with our Contrast Checker if text is involved.

What are the hex and RGB values for purple and yellow?

Purple has the hex code #800080 and RGB values rgb(128, 0, 128). Yellow has the hex code #FFFF00 and RGB values rgb(255, 255, 0). You can copy these directly into CSS or use the design tokens provided on this page.