HEX color reference

What color is #F59E0B?

A warm amber that works for warning states, attention cues, progress markers, and dashboard notices.

This page gives practical values for #F59E0B: RGB, HSL, readable text color, WCAG-style contrast, palette ideas, tints, shades, and code snippets. It is built for designers and developers who need more than a single color swatch.

#F59E0B
Amber warning

Color values

HEX
#F59E0B
RGB
rgb(245, 158, 11)
HSL
hsl(38, 92%, 50%)
Color family
amber

Contrast

The suggested readable text color for #F59E0B is #000000. Always test final typography and component size before shipping.

vs white: 2.15
vs black: 9.78
Preview text on #F59E0B

Best uses

  • - Warning badges
  • - Progress states
  • - Attention banners
  • - Operational notices

Palette ideas for #F59E0B

CSS and design token examples

Use these snippets as a starting point, then rename the token by purpose: primary, success, warning, accent, or surface. A named token is easier to maintain than repeating #F59E0B across many components.

CSS variables
:root {
  --primary: #F59E0B;
  --primary-rgb: 245, 158, 11;
  --primary-hsl: 38 92% 50%;
}
Tailwind config
// tailwind.config.js
export default {
  theme: {
    extend: {
      colors: {
        primary: "#F59E0B",
      },
    },
  },
};
JSON token
{
  "primary": "#F59E0B",
  "primaryRgb": [245, 158, 11],
  "primaryHsl": {"h": 38, "s": 92, "l": 50}
}
SCSS variables
$primary: #F59E0B;
$primary-rgb: 245, 158, 11;
$primary-hsl: 38 92% 50%;

How to use #F59E0B in UI

Use it with a role

Decide whether #F59E0B is a primary action, a status color, an accent, a chart color, or a background support color before adding it to a design system.

Create states

Use tints and shades for hover, active, selected, disabled, and subtle backgrounds. Do not invent unrelated colors for each state.

Check contrast

The fastest check is black versus white text, but final UI should be tested with actual font size, weight, and surface color.

Export consistently

Copy one source format into your token layer so the same color does not drift across CSS, Tailwind, JSON, and component files.

When to use and avoid #F59E0B

Use #F59E0B when

Use this color when its role is visible and repeatable. It works best when it is tied to a clear interface job such as a primary action, status badge, chart highlight, product category, or brand accent. The color should help users understand the page faster.

Avoid #F59E0B when

Avoid using it as a random decoration or applying it to too many unrelated elements. If every icon, card, heading, and button uses the same color, the color stops communicating priority. Use neutrals and tints to keep hierarchy clear.

Accessibility note

Contrast depends on the foreground and background pair, not the HEX value alone. Use the contrast scores above as an early check, then test the final component with real text size, font weight, spacing, and surrounding surfaces.

Token naming note

If #F59E0B appears more than once in your codebase, give it a token name. Good names describe purpose, such as primary, success, warning, accent, or surface. This prevents small color differences from spreading across components.

FAQ about #F59E0B

What is the RGB value of #F59E0B?

The RGB value is rgb(245, 158, 11). RGB is useful when checking browser dev tools, canvas pixels, or computed CSS values.

What is the HSL value of #F59E0B?

The HSL value is hsl(38, 92%, 50%). HSL is useful when creating lighter tints, darker shades, and calmer variations.

Which text color works best on #F59E0B?

Based on black and white contrast, #000000 is the better quick choice. For production UI, confirm the result with the final font size and component state.

Can I use #F59E0B in Tailwind or CSS variables?

Yes. Use the export snippets above as a starting point, then rename the color by role so the value is maintainable across your project.

Related color pages