Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
color-factory
Advanced tools
CSS colors transformer
$ npm i color-factory
import Color from 'color-factory'
const colorFromString = new Color('rgba(12, 34, 56, 0.7)')
colorFromString.toHex()
colorFromString.h(100).s(0.4).b(30).toHSL()
colorFromString.g()
const colorFromObject = new Color({h: 100, s: 0.5, l: 0.3})
colorFromObject.toRGBA()
Convert color instance to CSS hex string.
Convert color instance to CSS rgb string.
Convert color instance to CSS rgba string.
Convert color instance to CSS hsl string.
Convert color instance to CSS hsla string.
Convert color instance to CSS color string, such as 'red', 'blue', 'transparent' etc.
Get the value of red channel.
Get the value of green channel.
Get the value of blue channel.
Get the value of hue.
Get the value of saturation.
Get the value of lightness.
Get the value of alpha channel.
FAQs
CSS color converter
The npm package color-factory receives a total of 4 weekly downloads. As such, color-factory popularity was classified as not popular.
We found that color-factory demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.