Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gradstop

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradstop

JavaScript micro library to generate monotone color schemes and equidistant gradient stops

  • 2.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-23.65%
Maintainers
1
Weekly downloads
 
Created
Source

gradstop

NPM Version NPM Downloads License: MIT Build Status

JavaScript micro library to generate gradient color stops
DemoUMD Bundle

Usage:

npm install gradstop
import gradstop from 'gradstop';

const gradient = gradstop({
    stops: 5,
    inputFormat: 'hex',
    colorArray: ['#343838', '#00DFFC']
});

console.log(gradient);
// rgb(52,56,56), rgb(39,97,105), rgb(26,139,154), rgb(13,181,203), rgb(0,223,252)
Gradient Strip
Default Parameters:
  • inputFormat: 'hex' (supports hex, rgb and hsl)
  • stops: 5
  • colorArray: ['#fff', '#000'] (supports upto 4 values)

Both shorthand(#fff) and standard(#ffffff) format hex values are supported.

Polyfills required:
  • Math.trunc

Keywords

FAQs

Package last updated on 07 Apr 2019

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