Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ant-design/colors

Package Overview
Dependencies
Maintainers
9
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/colors - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

19

package.json
{
"name": "@ant-design/colors",
"version": "2.1.0",
"version": "3.0.0",
"description": "Color palettes calculator of Ant Design",

@@ -31,17 +31,16 @@ "main": "src/index.js",

"devDependencies": {
"@types/jest": "^24.0.9",
"@types/jest": "^24.0.11",
"@types/tinycolor2": "^1.4.1",
"@typescript-eslint/eslint-plugin": "^1.4.2",
"@typescript-eslint/parser": "^1.4.2",
"coveralls": "^3.0.2",
"eslint": "^5.15.1",
"@typescript-eslint/eslint-plugin": "^1.6.0",
"@typescript-eslint/parser": "^1.6.0",
"coveralls": "^3.0.3",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"jest": "^24.1.0",
"jest": "^24.7.1",
"prettier": "^1.16.4",
"ts-jest": "^24.0.0",
"typescript": "^3.2.2"
"ts-jest": "^24.0.2",
"typescript": "^3.4.2"
},
"homepage": "https://github.com/ant-design/ant-design-colors#readme"
}

@@ -18,2 +18,10 @@ <h1 align="center">Ant Design Colors</h1>

## Install
```bash
$ npm install @ant-design/colors
// or
$ yarn add @ant-design/colors
```
## Usage

@@ -26,2 +34,9 @@

```js
import { red, volcano, gold, yellow, lime, green, cyan, blue, geekblue, purple, magenta, grey } from '@ant-design/colors';
console.log(blue); // ['#E6F7FF', '#BAE7FF', '#91D5FF', ''#69C0FF', '#40A9FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C', '#002766']
console.log(blue.primary); // '#1890FF'
```
```js
import { generate, presetPalettes } from '@ant-design/colors';

@@ -32,3 +47,2 @@

console.log(colors); // ['#E6F7FF', '#BAE7FF', '#91D5FF', ''#69C0FF', '#40A9FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C', '#002766']
console.log(presetPalettes);

@@ -35,0 +49,0 @@ /*

@@ -28,2 +28,27 @@ "use strict";

presetPalettes[key] = generate_1.default(presetPrimaryColors[key]);
presetPalettes[key].primary = presetPalettes[key][6];
});
var red = presetPalettes.red;
exports.red = red;
var volcano = presetPalettes.volcano;
exports.volcano = volcano;
var gold = presetPalettes.gold;
exports.gold = gold;
var yellow = presetPalettes.yellow;
exports.yellow = yellow;
var lime = presetPalettes.lime;
exports.lime = lime;
var green = presetPalettes.green;
exports.green = green;
var cyan = presetPalettes.cyan;
exports.cyan = cyan;
var blue = presetPalettes.blue;
exports.blue = blue;
var geekblue = presetPalettes.geekblue;
exports.geekblue = geekblue;
var purple = presetPalettes.purple;
exports.purple = purple;
var magenta = presetPalettes.magenta;
exports.magenta = magenta;
var grey = presetPalettes.grey;
exports.grey = grey;
import generate from './generate';
export interface PalettesProps {
[key: string]: string[];
[key: string]: string[] & { primary?: string };
}

@@ -29,4 +29,34 @@

presetPalettes[key] = generate(presetPrimaryColors[key]);
presetPalettes[key].primary = presetPalettes[key][6];
});
export { generate, presetPalettes, presetPrimaryColors };
const red = presetPalettes.red;
const volcano = presetPalettes.volcano;
const gold = presetPalettes.gold;
const yellow = presetPalettes.yellow;
const lime = presetPalettes.lime;
const green = presetPalettes.green;
const cyan = presetPalettes.cyan;
const blue = presetPalettes.blue;
const geekblue = presetPalettes.geekblue;
const purple = presetPalettes.purple;
const magenta = presetPalettes.magenta;
const grey = presetPalettes.grey;
export {
generate,
presetPalettes,
presetPrimaryColors,
red,
volcano,
gold,
yellow,
lime,
green,
cyan,
blue,
geekblue,
purple,
magenta,
grey,
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc