@basalt/bedrock-utils
Advanced tools
Comparing version 0.30.0-alpha.0 to 0.30.0-alpha.2
@@ -72,2 +72,21 @@ /** @module utils */ | ||
} | ||
/** | ||
* @param {string} color | ||
* @return {Object} | ||
*/ | ||
export function parseColor(color) { | ||
return Color(color).object(); | ||
} | ||
/** | ||
* Has Opacity | ||
* Returns true if a color has opacity | ||
* @param {string} color - Css color string in any format | ||
* @return {boolean} - Returns true if the color has opacity, false if it is solid | ||
*/ | ||
export function hasOpacity(color) { | ||
var theColor = Color(color); | ||
return !!(theColor.rgb().array().length === 4); | ||
} | ||
//# sourceMappingURL=color.js.map |
{ | ||
"name": "@basalt/bedrock-utils", | ||
"license": "GPL-2.0-or-later", | ||
"version": "0.30.0-alpha.0", | ||
"version": "0.30.0-alpha.2", | ||
"description": "A Bedrock component that helps build Design Systems", | ||
@@ -17,3 +17,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@basalt/bedrock-core": "^0.29.0", | ||
"@basalt/bedrock-core": "^0.30.0-alpha.2", | ||
"color": "^3.0.0" | ||
@@ -27,4 +27,3 @@ }, | ||
"access": "public" | ||
}, | ||
"gitHead": "97e1a867fb6c256e927dbec11998bb21f1ba75cb" | ||
} | ||
} |
@@ -67,1 +67,20 @@ /** @module utils */ | ||
} | ||
/** | ||
* @param {string} color | ||
* @return {Object} | ||
*/ | ||
export function parseColor(color) { | ||
return Color(color).object(); | ||
} | ||
/** | ||
* Has Opacity | ||
* Returns true if a color has opacity | ||
* @param {string} color - Css color string in any format | ||
* @return {boolean} - Returns true if the color has opacity, false if it is solid | ||
*/ | ||
export function hasOpacity(color) { | ||
const theColor = Color(color); | ||
return !!(theColor.rgb().array().length === 4); | ||
} |
Sorry, the diff of this file is not supported yet
33786
418
+ Added@basalt/bedrock-core@0.30.0(transitive)
- Removed@basalt/bedrock-core@0.29.0(transitive)