Package Exports
- @arsams/color-shades
- @arsams/color-shades/dist/index.js
- @arsams/color-shades/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@arsams/color-shades) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
color-shades
Installation
pnpm add @arsams/color-shades
Usage
import { getShades, type GetShadesInput } from "@arsams/color-shades";
const shades = getShades({
amount: 0.1, // number between 0 and 1 (default: 0.1)
color: "#bada55", // base color
count: 10, // number of shades (default: 10)
mode: "both", // color mode (default: 'both') (lighten | darken | both)
output: "hex", // output format (default: 'hex') (hex | rgb | hsl)
});
console.log(shades);
// [
// "#e2f0b9",
// "#d4e996",
// "#c7e276",
// "#bbdc5a",
// "#bada55",
// "#b0d53c",
// "#a4ca2c",
// "#94b628",
// "#85a424",
// "#789420",
// ]