New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gradient-partitioner

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradient-partitioner

Awesome layouts with gradient partitioner.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 28 Jun 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

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