Socket
Socket
Sign inDemoInstall

gradient-partitioner

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gradient-partitioner

Awesome layouts with gradient partitioner.


Version published
Weekly downloads
6
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Gradient Partitioner

A simple library to slice gradients for node and browser.

Install

NPM

npm install --save gradient-partitioner

Yarn

yarn add gradient-partitioner

Usage

ES6

import GradientPartitioner from 'gradient-partitioner'

const range = new GradientPartitioner('#F05F57', '#360940', 0, 100)
range.partition(0, 45).cssGradient() // linear-gradient(to right, rgb(240, 95, 85), rgb(156, 56, 77))

Legacy

var GradientPartitioner = require('gradient-partitioner')

var range = new GradientPartitioner('#F05F57', '#360940', 0, 100)
range.partition(0, 45).cssGradient() // linear-gradient(to right, rgb(240, 95, 85), rgb(156, 56, 77))

Example

Example

To Do

  • Serialize to legacy browsers
  • 2d gradient with angle
  • Radial gradients
  • Multiple colors

License

MIT License

Copyright (c) 2017 Mateus Calza

Keywords

FAQs

Last updated on 28 Jun 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc