#3B82F6: Tailwind blue-500 color codes, contrast and shades
By TechCompare · Updated · How we check
#3B82F6 is rgb(59, 130, 246), the blue-500 of Tailwind CSS 2 and 3. For text on it, WCAG 2 picks black at 5.71:1, which passes AA. White gets 3.68:1, enough only for large text.
Color Codes
- HEX
#3B82F6 - RGB
rgb(59, 130, 246) - HSL
hsl(217, 91%, 60%) - OKLCH
oklch(62.31% 0.188 259.81)
Text on #3B82F6
White Text
Aa
The quick brown fox jumps over the lazy dog.
3.68:1APCA Lc -69.4
- AA Normal (4.5:1)Fail
- AA Large (3:1)Pass
- AAA Normal (7:1)Fail
- AAA Large (4.5:1)Fail
Black Text
Aa
The quick brown fox jumps over the lazy dog.
5.71:1APCA Lc 40.2
- AA Normal (4.5:1)Pass
- AA Large (3:1)Pass
- AAA Normal (7:1)Fail
- AAA Large (4.5:1)Pass
WCAG 2 ratios are the same whichever color is the text, so they also hold for #3B82F6 text on a white or black page. APCA is a newer method that isn't part of any WCAG standard, and a minus sign means light text on dark.
#3B82F6 mixes 59 red, 130 green and 246 blue into a bright medium blue. It's blue-500 in Tailwind CSS 2 and 3, so you'll find it on a lot of buttons, links and focus rings built with Tailwind. The cards above give its codes with copy buttons and test white and black text on it. Below are four lighter and four darker shades, and the named colors that come closest.
Shades
Same hue and chroma in OKLCH, with even steps of lightness. Open any shade in the Color Picker.
Nearest Named Colors
CSS Name
dodgerblue
#1E90FF
CloseΔE OK 0.036Tailwind 4
blue-500
oklch(62.3% 0.214 259.815)
Outside sRGB, so the closest hex is #2B7FFF
CloseΔE OK 0.026Tailwind 3
blue-500
#3B82F6
ExactΔE OK 0.000
About #3B82F6
Tailwind CSS 2 shipped a new color palette with #3B82F6 as its blue-500, and Tailwind 3 kept the same value. Tailwind 3 also used it for focus rings: the plain ring class drew a see-through blue-500 unless you picked another color.
Tailwind 4 moved its colors to OKLCH, and blue-500 changed with it. Version 4 writes it as oklch(62.3% 0.214 259.815), while #3B82F6 is oklch(62.31% 0.188 259.81). The chroma went from 0.188 to 0.214, so the new blue is more vivid. That much chroma is outside sRGB, so it takes a wide gamut screen to show it in full. The closest hex is #2B7FFF. Tailwind 4 also changed the default ring color to currentColor, so focus rings in an upgraded project stop being blue unless you set a ring color.
Text on #3B82F6 is a case where the two contrast methods disagree. WCAG 2 gives black text 5.71:1 and white text 3.68:1. So black passes AA at any size, and white only passes for large text: 24px and up, or about 18.66px bold. APCA, a newer method that isn't part of any WCAG standard, reads it the other way around. White text scores Lc -69.4, and black text only Lc 40.2, under the Lc 45 APCA suggests even for large headlines.
WCAG 2.2 still decides pass or fail, so if you need white text to pass, go one step darker. Tailwind 3's blue-600, #2563EB, gives white text 5.17:1 and passes AA. So does #2168DA, the first darker step in the shade scale, at 5.18:1.
Verdict
Use #3B82F6 for fills, icons, borders and large headings, and put black text on it when the text has to pass WCAG AA. As link or body text on a white page it only reaches 3.68:1, which fails AA for normal text, so pick a darker blue there. For buttons with white labels, #2168DA or Tailwind 3's blue-600 (#2563EB) keeps the look and passes.
The shade scale keeps the OKLCH chroma and hue of #3B82F6 and moves the lightness in even steps toward white and toward black. A step sRGB can't show loses chroma until it fits, so its hue stays put. Black text passes AA on every lighter step, and white text passes on every darker one. Click a shade to open it in the Color Picker.
More Color scenarios
Related guides
Frequently asked questions
What color is #3B82F6?
Should I use white or black text on #3B82F6?
Is #3B82F6 the same as Tailwind 4's blue-500?
How do I use #3B82F6 with transparency?
Related tools
Contrast Checker
Check color contrast ratios for WCAG AA/AAA accessibility compliance.
Use toolJSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolAspect Ratio Visualizer
Visually compare width differences between 16:9, 21:9, and 32:9 monitors.
Use tool