@ant-design/colors
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14794
8
12
251
2
+ Addedtslint@^5.12.0
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbuiltin-modules@1.1.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedtslint@5.20.1(transitive)
+ Addedtsutils@2.29.0(transitive)
+ Addedtypescript@5.6.3(transitive)
+ Addedwrappy@1.0.2(transitive)