# ant-design-palettes

> Color palettes calculator of Ant Design

Latest version **1.1.3** (published 2018-08-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ant-design-palettes
pnpm add ant-design-palettes
yarn add ant-design-palettes
bun add ant-design-palettes
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2018-08-23 |
| First published | 2018-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 690 |
| Author | afc163 |
| Maintainers | afc163 |

## Links

- npm: https://www.npmjs.com/package/ant-design-palettes
- Repository: https://github.com/ant-design/ant-design-palettes
- Homepage: https://github.com/ant-design/ant-design-palettes#readme
- Issues: https://github.com/ant-design/ant-design-palettes/issues
- npm.io page: https://npm.io/package/ant-design-palettes

## Dependencies (1)

- [tinycolor2](https://npm.io/package/tinycolor2.md) ^1.4.1

## Recent versions

- 1.1.3 (latest) — 2018-08-23
- 1.1.2 — 2018-04-09
- 1.1.1 — 2018-03-12
- 1.1.0 — 2018-03-12
- 1.0.0 — 2018-03-12

## README

# Ant Design Palettes

[![](https://img.shields.io/travis/ant-design/ant-design-palettes/master.svg?style=flat-square)](https://travis-ci.org/ant-design/ant-design-palettes)
[![npm package](https://img.shields.io/npm/v/ant-design-palettes.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-palettes)

:art: Color palettes calculator of [Ant Design](https://ant.design/docs/spec/colors).

![](https://gw.alipayobjects.com/zos/rmsportal/cYDwIQtKOZRavAqKqfNq.png)

## Usage

```bash
$ npm install ant-design-palettes --save
```

```js
import { generate, presetPalettes } from 'ant-design-palettes';

// Generate color palettes by a given color
const colors = generate('#1890ff');
console.log(colors); // ['#E6F7FF', '#BAE7FF', '#91D5FF', ''#69C0FF', '#40A9FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C', '#002766']

console.log(presetPalettes);
/*
{
  red: [...],
  volcano: [...],
  orange: [...],
  gold: [...],
  yellow: [...],
  lime: [...],
  green: [...],
  cyan: [...],
  blue: [...],
  geekblue: [...],
  purple: [...],
  magenta: [...],
}
*/
```

## Articles

- [Ant Design Colors](https://ant.design/docs/spec/colors)
- [Ant Design 色板生成算法演进之路](https://zhuanlan.zhihu.com/p/32422584)

---
_Source: https://npm.io/package/ant-design-palettes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
