# noTailwindRawColors

Rule `biome/noTailwindRawColors`. Disallow Tailwind CSS utility classes that use raw palette colors.

- Source: biome
- Technologies: Tailwind CSS, React
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1943 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noTailwindRawColors` | no | no | group nursery, since 2.5.15 | [docs](https://biomejs.dev/linter/rules/no-tailwind-raw-colors/) |

## Code examples

### Incorrect: the rule reports this

```jsx
<div className="bg-pink-500" />;
```

```jsx
<div className="hover:text-red-500/80" />;
```

### Correct: the rule accepts this

```jsx
<div className="bg-primary hover:text-muted-foreground" />;
```

```jsx
<div className="bg-white text-black border-transparent fill-current stroke-inherit" />;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noTailwindRawColors": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noTailwindArbitraryValue](https://lintradar.dev/rules/biome/noTailwindArbitraryValue.md): Disallow arbitrary values in Tailwind CSS utility classes.
- [biome/noTailwindRestrictedClasses](https://lintradar.dev/rules/biome/noTailwindRestrictedClasses.md): Disallow Tailwind CSS classes and variants that your project doesn't allow.
- [biome/noSvelteLegacyConst](https://lintradar.dev/rules/biome/noSvelteLegacyConst.md): Disallow legacy Svelte `{@const}` tags.
- [biome/noTailwindRestyledComponents](https://lintradar.dev/rules/biome/noTailwindRestyledComponents.md): Disallow Tailwind utilities that override the appearance of components.
- [biome/noSvelteIgnoredUnsubscribe](https://lintradar.dev/rules/biome/noSvelteIgnoredUnsubscribe.md): Disallow ignoring the function returned by a store's `subscribe()` method.
- [biome/noUndeclaredClasses](https://lintradar.dev/rules/biome/noUndeclaredClasses.md): Reports CSS class names in JSX `className` or `class` attributes that are not defined in any imported CSS file.

---

Web page: https://lintradar.dev/rules/biome/noTailwindRawColors. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
