rvanwijnen/spectral.js
Spectral.js is a paint like color mixing library utilizing the Kubelka-Munk theory. observed · 2026-08-28
Health v2 · maintenance only
48/100
- Activity 60
- Release rhythm 8
- Longevity 89
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 1248
- days_rel: 495
- days_push: 244
- n_releases_24m: 1
Adoption not part of the score
1220 stars · 27 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Spectral.js is a lightweight JavaScript library for realistic paint-like color mixing based on the Kubelka-Munk theory, simulating how pigments absorb and scatter light. It uses spectral reflectance and perceptual color spaces like OKLab and OKLCh with gamut mapping, rather than simple RGB blending.
Use cases
- mix colors like real paint in javascript
- create realistic color gradients in the browser
- build a digital painting app with pigment mixing
- generate paint-like color palettes
- blend colors physically accurately instead of RGB
- implement a color picker with realistic mixing
- creative coding with spectral color blending
When to choose
- you need physically plausible pigment mixing rather than RGB interpolation
- you're building painting tools, color pickers, or palette generators in JavaScript
- you want perceptually uniform color math with OKLab/OKLCh and gamut mapping
- you need a lightweight, dependency-free color mixing library
When to avoid
- you just need simple linear RGB or HSL blending
- you need full multi-constant Kubelka-Munk with measured pigment data
- you're working outside JavaScript/browser environments
- performance-critical pixel loops where spectral math is too heavy
Facets
library · maturity active
graphics image-processing math graphics web-development frontend browser cross-platform color-mixing kubelka-munk pigment color-science oklab gradient palette creative-coding game-development nodejs javascript
2 sources
- readme: https://github.com/rvanwijnen/spectral.js · fetched 2026-08-28 · 892feb29d0d0
- homepage: https://spectraljs.com/ · fetched 2026-08-29 · c9faa9f44018
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| rvanwijnen/spectral.js | main | 48 |
For agents
markdown · JSON · MCP: product_card(name="rvanwijnen/spectral.js")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem