Skip to content

Latest commit

 

History

126 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

color-map-rainbow

NPM version NPM downloads badge-size-es5-url badge-size-es2015-url stable

GitHub Action Codecov

Changesets

Visual Studio Code

Create rainbow of colors with minimal dependency.

Inspired from color-rainbow

createRainbow(shades)

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))

Contribute

# 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

PNPM Commands

# 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

About

Creates rainbow of colors

Topics

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages