Installation
Prerequisites
- One of Vue 3 (v3.4+), React (v18+), Preact (v10.19+), Svelte (v5.29+), or Angular (v21.2+)
- Node.js (v18+) or Bun
Packages
| Package | Description |
|---|---|
urcolor | The color engine on its own, under an unscoped name. Re-exports @urcolor/core |
@urcolor/core | Core color logic and accessibility utilities |
@urcolor/shared | Framework-agnostic picker behavior, WebGL rendering, and grid samplers shared by every binding |
@urcolor/vue | Vue 3 components and composables |
@urcolor/react | React components and hooks |
@urcolor/preact | The React components and hooks, compiled against preact/compat |
@urcolor/svelte | Svelte 5 components and rune hooks |
@urcolor/angular | Angular directives and signal stores |
@urcolor/relative | Opt-in CSS Color 5 relative color syntax |
@urcolor/i18n | Multilingual color names and channel labels |
Install
Vue
bun add @urcolor/vuenpm install @urcolor/vuepnpm add @urcolor/vueyarn add @urcolor/vueReact
bun add @urcolor/reactnpm install @urcolor/reactpnpm add @urcolor/reactyarn add @urcolor/reactPreact
bun add @urcolor/preactnpm install @urcolor/preactpnpm add @urcolor/preactyarn add @urcolor/preactSvelte
bun add @urcolor/sveltenpm install @urcolor/sveltepnpm add @urcolor/svelteyarn add @urcolor/svelteAngular
bun add @urcolor/angularnpm install @urcolor/angularpnpm add @urcolor/angularyarn add @urcolor/angularEvery framework package depends on @urcolor/core and @urcolor/shared, so both come along with whichever binding you install. Nothing else does: the Vue package builds on Reka UI primitives, but bundles the parts it uses and ships no dependency on it, and the other bindings carry no third-party runtime dependency at all.
Core only
For the color utilities without a framework binding, install urcolor, the unscoped name for the same engine:
bun add urcolornpm install urcolorpnpm add urcoloryarn add urcolorimport { Color } from "urcolor";urcolor holds no code of its own. It re-exports @urcolor/core and depends on it by the same range the framework packages use, so you get one copy of the engine and one Color class either way. Install whichever name you prefer. @urcolor/core is already present if you installed a framework binding, and mixing the two names in one project is safe.
Optional packages
@urcolor/relative adds CSS Color 5 relative color syntax, and @urcolor/i18n adds multilingual color naming:
bun add @urcolor/relative @urcolor/i18nnpm install @urcolor/relative @urcolor/i18npnpm add @urcolor/relative @urcolor/i18nyarn add @urcolor/relative @urcolor/i18n