I need hex color code for a yellow that indicates a warning. This will be the text color…
- User
I need hex color code for a yellow that indicates a warning. This will be the text color and it needs to be readable on a light grey background
Assistant
For a yellow warning color that is readable on a light grey background, you’ll want a shade of yellow with sufficient contrast and high visibility. A good option is a bright, saturated yellow — not too pale (to maintain contrast) and not too dark (to keep the “warning” feel).
✅ Recommended Hex Code:
#CC9900This is a golden yellow that:
- Stands out clearly against a light grey background.
- Is more readable than very pale yellows like
#FFFF99. - Has a warm, cautionary tone suitable for warnings.
🔍 Contrast Check
Assuming your light grey background is something like
#F0F0F0or#D3D3D3, here's how it stacks up:- Contrast Ratio: ~7:1 between
#CC9900and#F0F0F0 - This exceeds the WCAG AA standard for text readability (4.5:1 for normal text)
🧪 Alternative Bright Warning Yellows
If you'd like to explore other options:
Hex Code Description Contrast vs #F0F0F0 #FFA500Orange-Yellow ~8:1 #FFC100Bright Amber ~6.5:1 #D4AF37Metallic Gold (darker) ~9:1 #FFD700Golden Yellow (brighter) ~6:1 You can adjust based on preference for tone (gold vs amber), but
#CC9900gives a solid balance of visibility, aesthetics, and accessibility.
💡 Tip:
Always test colors together in your actual UI, especially if used for accessibility-sensitive contexts like warnings or alerts.
Would you like a tool or formula to calculate contrast ratios yourself?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.