# Two-Tone Text

> Headline text split into two flat colors at a hard gradient stop, like a horizon line.

- Category: [CSS Text Effects](https://copy-css.com/category/text)
- Tags: split, hard stop, two color, background-clip, headline
- Live preview: https://copy-css.com/snippets/two-tone-text
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<h2 class="text-two-tone">Horizon</h2>
```

## CSS

```css
.text-two-tone {
  --top: #0284c7;
  --bottom: #0f172a;
  --split: 55%;
  margin: 0;
  font: 900 52px/1 system-ui, sans-serif;
  background: linear-gradient(var(--top) var(--split), var(--bottom) var(--split));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
```

## Notes

- This CSS Two-Tone Text is 11 lines of pure CSS (0.3 KB) with no JavaScript and no dependencies. It uses linear gradients, gradient-clipped text and custom properties.
- gradient-clipped text: Includes the -webkit- prefix Safari still needs.
- Customize with: `--top`, `--bottom`, `--split`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
