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

@khanacademy/wonder-blocks-color

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/wonder-blocks-color - npm Package Compare versions

Comparing version 1.1.20 to 1.2.0

CHANGELOG.md

24

dist/es/index.js
import _extends from '@babel/runtime/helpers/extends';
/**
* A color manipulation library useful for dynamically
* mixing colors together.
*/
const color6Regexp = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;

@@ -11,4 +7,2 @@ const color3Regexp = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i;

// Parse a color in #abcdef, rgb(...), or rgba(...) form into an object
// with r,g,b,a keys.
const parse = color => {

@@ -53,5 +47,4 @@ if (typeof color !== "string") {

throw new Error(`Failed to parse color: ${color}`);
}; // Stringify the color in an `rgba()` or `#abcdef` format.
};
const format = color => {

@@ -72,5 +65,4 @@ const r = Math.round(color.r);

}
}; // Adjust the alpha value of a color.
};
const fade = (color, percentage) => {

@@ -85,5 +77,3 @@ if (percentage < 0 || percentage > 1) {

}));
}; // Mix a color into a background color, using the alpha channel of the base
// color to determine the linear blend.
};
const mix = (color, background) => {

@@ -103,3 +93,2 @@ const colorObj = parse(color);

const Color = {
// Product
blue: "#1865f2",

@@ -110,3 +99,2 @@ purple: "#9059ff",

red: "#d92916",
// Neutral
offBlack,

@@ -122,4 +110,3 @@ offBlack64: fade(offBlack, 0.64),

white50: fade(white, 0.5),
// Brand
darkBlue: "#0a2a66",
darkBlue: "#0b2149",
teal: "#14bf96",

@@ -134,3 +121,2 @@ lightBlue: "#37c5fd",

export default Color;
export { SemanticColor, fade, mix };
export { SemanticColor, Color as default, fade, mix };

@@ -223,3 +223,3 @@ module.exports =

// Brand
darkBlue: "#0a2a66",
darkBlue: "#0b2149",
teal: "#14bf96",

@@ -226,0 +226,0 @@ lightBlue: "#37c5fd",

{
"name": "@khanacademy/wonder-blocks-color",
"version": "1.1.20",
"version": "1.2.0",
"design": "v2",

@@ -16,7 +16,6 @@ "publishConfig": {

"devDependencies": {
"wb-dev-build-settings": "^0.2.0"
"wb-dev-build-settings": "^0.4.0"
},
"author": "",
"license": "MIT",
"gitHead": "9ebea88533e702011165072f090a377e02fa3f0f"
"license": "MIT"
}

@@ -57,3 +57,3 @@ // @flow

// Brand
darkBlue: "#0a2a66",
darkBlue: "#0b2149",
teal: "#14bf96",

@@ -60,0 +60,0 @@ lightBlue: "#37c5fd",

Sorry, the diff of this file is not supported yet

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