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

@ant-design/colors

Package Overview
Dependencies
Maintainers
8
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.0.0 to 2.0.1

tests/index.test.ts

14

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

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

"prepublishOnly": "npm run compile",
"lint": "eslint .",
"lint": "tslint **/*.ts",
"jest": "jest --coverage && cat ./coverage/lcov.info | coveralls",

@@ -24,3 +24,4 @@ "test": "npm run lint && npm run jest"

"dependencies": {
"tinycolor2": "^1.4.1"
"tinycolor2": "^1.4.1",
"tslint": "^5.12.0"
},

@@ -31,10 +32,9 @@ "devDependencies": {

"coveralls": "^3.0.2",
"eslint": "^5.11.0",
"eslint-plugin-typescript": "^0.14.0",
"jest": "^23.6.0",
"ts-jest": "^23.10.5",
"typescript": "^3.2.2",
"typescript-eslint-parser": "^21.0.2"
"tslint": "^5.12.0",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.2.2"
},
"homepage": "https://github.com/ant-design/ant-design-colors#readme"
}

@@ -11,9 +11,9 @@ import tinycolor from 'tinycolor2';

interface hsvObject {
h: number,
s: number,
v: number,
};
interface HsvObject {
h: number;
s: number;
v: number;
}
function getHue(hsv: hsvObject, i: number, light?: boolean) {
function getHue(hsv: HsvObject, i: number, light?: boolean) {
let hue;

@@ -34,3 +34,3 @@ // 根据色相不同,色相转向不同

function getSaturation(hsv: hsvObject, i: number, light?: boolean) {
function getSaturation(hsv: HsvObject, i: number, light?: boolean) {
// grey color don't change saturation

@@ -62,3 +62,3 @@ if (hsv.h === 0 && hsv.s === 0) {

function getValue(hsv: hsvObject, i: number, light?: boolean) {
function getValue(hsv: HsvObject, i: number, light?: boolean) {
if (light) {

@@ -65,0 +65,0 @@ return Math.round(hsv.v * 100) + (brightnessStep1 * i);

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