
Research
/Security News
GlassWASM: WebAssembly Malware Found in Trojanized Open VSX Extensions
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.
@ricokahler/color2k
Advanced tools
a color parsing and manipulation lib served in roughly 2kB or less (2.8kB to be more precise)
color2k is a color parsing and manipulation library with the objective of keeping the bundle size as small as possible while still satisfying all of your color manipulation needs in an sRGB space.
The full bundle size is currently 2.8kB but gets as small as 2.1k with tree shaking.
| lib | size |
|---|---|
| chroma-js | 13.7kB |
| polished | 11.2kB |
| color | 7.6kB |
| tinycolor2 | 5kB |
| color2k | 2.8kB 😎 |
👋 Compare tree-shaken bundle outputs on bundle.js.org
npm i color2k
or
yarn add color2k
import { darken, transparentize } from 'color2k';
// e.g.
darken('blue', 0.1);
transparentize('red', 0.5);
There are two secrets that keep this lib especially small:
rgba and hslargba and hsla as outputs?This lib was created with the use case of CSS-in-JS in mind. At the end of the day, all that matters is that the browser can understand the color string you gave it as a background-color.
Because only those two color models are supported, we don't have to add code to deal with optional alpha channels or converting to non-browser supported color models (e.g. CMYK).
We believe that this lib is sufficient for all of your color manipulation needs. If we're missing a feature, feel free to open an issue 😎.
Heavy credits goes to polished.js and sass. Much of the implementation of this lib is copied from polished!
FAQs
a color parsing and manipulation lib served in roughly 2kB
We found that @ricokahler/color2k demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.