---
title: "Text color animated icon"
description: "Text color animated icon (Text & document editing). The chosen colour is applied to the text. Light: the swatch is pressed and springs back; the old colour washes out of the A (it dims to 0.3), and the new colour paints it back from the foot nearest the swatch: up the left leg, over the apex, down the right leg, then across the crossbar. Strong: a deeper press with a rebound, the same repaint, and the A takes the colour with a hop that lands with a hit and a small rebound. The dimmed A keeps its counter closed throughout."
canonical: https://generativeicons.com/icons/text-color/
---

# Text color animated icon

The chosen colour is applied to the text. Light: the swatch is pressed and springs back; the old colour washes out of the A (it dims to 0.3), and the new colour paints it back from the foot nearest the swatch: up the left leg, over the apex, down the right leg, then across the crossbar. Strong: a deeper press with a rebound, the same repaint, and the A takes the colour with a hop that lands with a hit and a small rebound. The dimmed A keeps its counter closed throughout.

- Id: `text-color`
- Category: Text & document editing
- Search terms: font color, font colour, text colour, colour, foreground color, letter color, change font color, ink color
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/text-color.lottie (dotLottie, 3790 bytes, sha256 d1840a7fd058955a54ed1121d74093b1e32bc1ec31cf6dd73ae7bc977c0cd0e0)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add text-color
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/text-color.mjs';

export function TextColorIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/text-color.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/text-color/ · https://generativeicons.com/api/icons/text-color
