Backgrounds
background-color to Tailwind
Becomesbg-* with a palette name; a colour outside the palette is emitted as an arbitrary value.The 3 mappings below are read straight out of Tailwind v4.3.3, not maintained by hand, so this is what the converter will actually produce for background-color.
background-color values and their classes
| CSS | Tailwind |
|---|---|
| background-color: currentcolor; | bg-current |
| background-color: inherit; | bg-inherit |
| background-color: transparent; | bg-transparent |
Colours
Colour values are not a fixed list — the converter matches yours against the Tailwind palette and picks the nearest name, so any of the palette's shades works the same way. A few worked examples:
| CSS | Tailwind |
|---|---|
| background-color: #fff; | bg-white |
| background-color: #000; | bg-black |
| background-color: oklch(96.8% 0.007 247.896); | bg-slate-100 |
| background-color: oklch(55.4% 0.046 257.417); | bg-slate-500 |
| background-color: oklch(20.8% 0.042 265.755); | bg-slate-900 |
| background-color: oklch(63.7% 0.237 25.331); | bg-red-500 |
| background-color: oklch(69.6% 0.17 162.48); | bg-emerald-500 |
| background-color: oklch(68.5% 0.169 237.323); | bg-sky-500 |
Values that are not on the scale
Anything without a named class is written as an arbitrary value in square brackets. The converter falls back to this rather than rounding your CSS to the nearest class, because silently changing a value is worse than an ugly class name.
bg-[your value]Other backgrounds properties
Converting a whole stylesheet?
Paste it into the converter and get every rule at once, shorthands expanded, media queries turned into breakpoint variants, and the parts that have no Tailwind equivalent flagged rather than dropped.
Open the converter