
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@open-kappa/colors
Advanced tools
A professional, high-precision color manipulation library for TypeScript and JavaScript. Designed for scientific accuracy, HDR workflows, and modern web standards.
TypeScript.npm install @open-kappa/colors
// Or
bun install @open-kappa/colors
Simple conversion between spaces. By default, high-precision mathematical conversions are used.
import {
Hex,
Oklch
} from "@open-kappa/colors"
// Parse a color
const red = Hex.fromRgbHexString("#FF0000")
// Convert to modern perceptual space
const oklch = red.to(Oklch)
console.log(oklch.components) // [0.627, 0.257, 29.23, 1]
Handle complex scenarios like converting an HDR Rec.2020 color to a standard sRGB monitor, applying Tone Mapping and Gamut Mapping automatically.
import {
Base,
Rec2020,
Rgb
} from "@open-kappa/colors"
// An extremely bright HDR red (unsupported by standard monitors)
const superBright = Rec2020.fromComponents([2.0, 0, 0, 1])
// "The Ultimate Conversion": White Balance -> Tone Map -> Gamut Map
const displayReady = Base.convert(superBright, Rgb, {
"gamutMapping": true,
// Use modern AgX filmic tone mapping
"toneMapping": {"fn": "agX", "look": "punchy"},
"whiteBalance": "bradford"
})
Currently supports 28 color spaces, including legacy, print, and modern HDR standards:
To ensure maintainability and tree-shakability, the library uses a Star Topology. Every color space maps directly to/from XYZ (D65). This allows conversion between any two spaces in exactly two steps, avoiding the complexity of direct converters.
flowchart LR
XYZ <--> AcesCg
XYZ <--> aRgb[Adobe RGB]
XYZ <--> CMYK
XYZ <--> LinearRGB
XYZ <--> HSL
XYZ <--> ICtCp
XYZ <--> JzAzBz
XYZ <--> JzCzHz
XYZ <--> Lab
XYZ <--> Lch
XYZ <--> LchUv
XYZ <--> LMS
XYZ <--> Luv
XYZ <--> Lms2006
XYZ <--> LmsCat02
XYZ <--> LmsHpe
XYZ <--> OKLAB
XYZ <--> OKLCH
XYZ <--> ProPhoto
XYZ <--> Rec.2020
XYZ <--> Rec.709
XYZ <--> RGB
XYZ <--> HSV
XYZ <--> HWB
XYZ <--> P3
XYZ <--> xyY
XYZ <--> XYZ-D50
XYZ <--> YCbCr
XYZ <--> YUV
@open-kappa/colors is released under the liberal MIT License.
Please refer to the LICENSE.txt project file for further details.
FAQs
Color library
We found that @open-kappa/colors demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.