Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

stepping colors

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 CSS color string
  • color2 - a CSS color string
  • count - the desired number of intermediate colors to return, defaults to 6

The return value is an array of colors in rgba format (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(43,43,43)
rgb(85,85,85)
rgb(128,128,128)
rgb(170,170,170)
rgb(212,212,212)

stepping colors

Keywords

FAQs

Package last updated on 28 Oct 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc