@khanacademy/wonder-blocks-color
Advanced tools
Comparing version 2.0.1 to 3.0.0
# @khanacademy/wonder-blocks-color | ||
## 3.0.0 | ||
### Major Changes | ||
- 48d3c7e9: Fix how mix formats single-digit color components | ||
## 2.0.1 | ||
@@ -4,0 +10,0 @@ |
@@ -59,3 +59,3 @@ function _extends() { | ||
const asString = c.toString(16); | ||
return asString.length === 1 ? asString + asString : asString; | ||
return asString.length === 1 ? `0${asString}` : asString; | ||
}; | ||
@@ -62,0 +62,0 @@ return `#${_s(r)}${_s(g)}${_s(b)}`; |
@@ -63,3 +63,3 @@ 'use strict'; | ||
const asString = c.toString(16); | ||
return asString.length === 1 ? asString + asString : asString; | ||
return asString.length === 1 ? `0${asString}` : asString; | ||
}; | ||
@@ -66,0 +66,0 @@ return `#${_s(r)}${_s(g)}${_s(b)}`; |
{ | ||
"name": "@khanacademy/wonder-blocks-color", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"design": "v2", | ||
@@ -16,6 +16,6 @@ "publishConfig": { | ||
"devDependencies": { | ||
"wb-dev-build-settings": "^0.9.0" | ||
"@khanacademy/wb-dev-build-settings": "^1.0.0" | ||
}, | ||
"author": "", | ||
"license": "MIT" | ||
} | ||
} |
@@ -79,2 +79,3 @@ import {fade, mix} from "../utils"; | ||
["rgba(100,200,100,0.25)", "rgb(255,255,0)", "#d8f119"], | ||
["rgba(33,36,44,0.32)", "#00a60e", "#0b7c18"], | ||
]; | ||
@@ -81,0 +82,0 @@ |
@@ -64,6 +64,5 @@ /** | ||
if (color.a === 1) { | ||
// @ts-expect-error [FEI-5019] - TS7006 - Parameter 'c' implicitly has an 'any' type. | ||
const _s = (c) => { | ||
const _s = (c: number) => { | ||
const asString = c.toString(16); | ||
return asString.length === 1 ? asString + asString : asString; | ||
return asString.length === 1 ? `0${asString}` : asString; | ||
}; | ||
@@ -70,0 +69,0 @@ return `#${_s(r)}${_s(g)}${_s(b)}`; |
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
64144
12