This repository was archived by the owner on Aug 27, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation and Usage
Sriman edited this page Aug 10, 2025
·
2 revisions
Kolory can be installed via all major package managers or used directly in the browser via a CDN.
# npm
npm install kolory
# yarn
yarn add kolory
# pnpm
pnpm add kolory
# bun
bun add koloryInclude Kolory in your HTML for browser-based projects:
<!-- UNPKG -->
<script src="https://unpkg.com/kolory/dist/index.iife.js"></script>
<!-- jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/kolory/dist/index.iife.js"></script>
<!-- ESM (Modern Browsers) -->
<script type="module">
import kolory from 'https://esm.sh/kolory';
</script>Kolory provides a straightforward API to access and manipulate colors in various formats. Below are examples for different environments.
import kolory, { hex, rgb, rgba, hsl, hsla } from 'kolory';
console.log(kolory.hex.blue_metal);
console.log(hex.blue_metal);
console.log(rgb.blue_metal);const { hex, rgb } = require('kolory');
console.log(hex.sunset_orange);
console.log(rgb.sunset_orange);<script src="https://unpkg.com/kolory/dist/index.iife.js"></script>
<script>
console.log(kolory.hex.blue_metal);
</script>