Create rainbow of colors with minimal dependency.
Inspired from color-rainbow
import { createRainbow } from 'color-map-rainbow'
import { rgbHex, rgbaString } from 'color-map'
// rainbow = array of [r,g,b,a=1]
const rainbow = createRainbow(72)
// transparentRainbow = array of [r,g,b, 0...0.8]
const transparentRainbow = createRainbow(72, [0, 0.8])
// use `color-map` conversion function to get
// '#000000' or 'rgba(...)`
const hexRainbow = rainbow.map(c => rgbHex(c))
const rgbaRainbow = rainbow.map(c => rgbaString(c))# right after clone
pnpm install
# begin making changes
git checkout -b <branch>
pnpm watch
# edit `tsdown.config.ts` to change what the bundles include
# describe the change for the changelog, if it affects the published package
pnpm cs
git commit -m "<commit message>"
git push
# create PR# Run the tests in watch mode.
pnpm watch
# Run the tests once.
pnpm test
# Run everything CI runs: lint, build, depcheck, typecheck, coverage.
pnpm verify
# Build the package.
pnpm build
# Lint and format.
pnpm check
pnpm check:fix