ColorWell · contrast check
White or black text on #f7df1e?
JavaScript yellow
Use black text. It gives 15.53:1, which passes AAA (and AA).
White text
1.35:1
fails AA
Black text
15.53:1
passes AAA (and AA)
What the thresholds mean
| Level | Needs | White text | Black text |
|---|---|---|---|
| AA, normal text | 4.5:1 | fail | pass |
| AA, large text (18pt+/14pt bold) | 3:1 | fail | pass |
| AAA, normal text | 7:1 | fail | pass |
If you need the other one to pass
Same hue, moved along the lightness ramp until the ratio clears AA.
- For white text, use
#796200— 5.9:1
The colour itself
- Hex:
#f7df1e - RGB:
247, 223, 30 - Oklch:
89.59% 0.182 101
Shade ramp
#fff5a5 #efe17c #d8c646 #bca600 #9a8000 #796200 #5a4700 #3c2c00 #211400
Paste this into your config
// tailwind.config.js
colors: {
brand: {
100: "#fff5a5",
200: "#efe17c",
300: "#d8c646",
400: "#bca600",
500: "#9a8000",
600: "#796200",
700: "#5a4700",
800: "#3c2c00",
900: "#211400",
},
}Text colour to pair with the 500 shade (#9a8000): black, at 5.46:1. For #f7df1e itself it is black, at 15.53:1.
Your own colours, the same way
Paste any hex and get this page for it live — ratio, verdict, ramp. Export the whole palette to CSS variables, a Tailwind config or Figma tokens when you want it in the project rather than on the screen.
Open ColorWellOther colours
- text on #ef4444 Tailwind red-500
- text on #f97316 Tailwind orange-500
- text on #f59e0b Tailwind amber-500
- text on #eab308 Tailwind yellow-500
- text on #84cc16 Tailwind lime-500
- text on #22c55e Tailwind green-500
- text on #10b981 Tailwind emerald-500
- text on #14b8a6 Tailwind teal-500
- text on #06b6d4 Tailwind cyan-500
- text on #0ea5e9 Tailwind sky-500
- text on #3b82f6 Tailwind blue-500
- text on #6366f1 Tailwind indigo-500