# Tinted Elevation Scale

> An elevation scale whose shadows are tinted with your brand color, so they look clean on colored pages.

- Category: [CSS Box Shadows](https://copy-css.com/category/shadows)
- Tags: colored, color-mix, brand, levels, design tokens
- Live preview: https://copy-css.com/snippets/tinted-elevation
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="tinted-elevation tinted-elevation-1"></div>
<div class="tinted-elevation tinted-elevation-2"></div>
<div class="tinted-elevation tinted-elevation-3"></div>
```

## CSS

```css
.tinted-elevation {
  --tint: #4338ca;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #ffffff;
}

.tinted-elevation-1 {
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--tint) 20%, transparent),
    0 2px 6px -1px color-mix(in srgb, var(--tint) 16%, transparent);
}

.tinted-elevation-2 {
  box-shadow:
    0 2px 4px color-mix(in srgb, var(--tint) 16%, transparent),
    0 10px 20px -6px color-mix(in srgb, var(--tint) 28%, transparent);
}

.tinted-elevation-3 {
  box-shadow:
    0 4px 8px color-mix(in srgb, var(--tint) 14%, transparent),
    0 24px 44px -12px color-mix(in srgb, var(--tint) 40%, transparent);
}
```

## Notes

- This CSS Tinted Elevation Scale is 25 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses box shadows and custom properties.
- Customize with: `--tint`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
