Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

color-steps

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-steps

A utility for calculating intermediate steps between two colors.

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-84.62%
Maintainers
1
Weekly downloads
 
Created
Source

color-steps Travis

A utility for calculating intermediate steps between two colors.

API

This package exports a single function that takes three arguments:

  • color1 - a string representation of a color
  • color2 - a string representation of a color
  • count - the desired number of intermediate colors to return, defaults to 6

The return value is an array of colors in string format, either rgba or rgb if all colors have an alpha value of 1.

CLI

This package also exposes a single executable (called color-steps) that accepts command-line arguments which are the same as the function arguments detailed above.

color-steps "red" "blue" 10

Try it

$ npx color-steps "black" "white" 5

rgb(5,5,5)
rgb(10,10,10)
rgb(15,15,15)
rgb(20,20,20)
rgb(25,25,25)

Keywords

color

FAQs

Package last updated on 29 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts