All Projects → colorjs → color-rgba

colorjs / color-rgba

Licence: other
Get rgba array from color string

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to color-rgba

color-name
A JSON with CSS color names
Stars: ✭ 72 (+300%)
Mutual labels:  color, colorjs
color-parse
Color string parser
Stars: ✭ 44 (+144.44%)
Mutual labels:  color, colorjs
color-alpha
Change alpha of a color string
Stars: ✭ 19 (+5.56%)
Mutual labels:  color, colorjs
color-picker
A color picker app made in flutter
Stars: ✭ 46 (+155.56%)
Mutual labels:  color
ghci-color
colorize ghci output
Stars: ✭ 74 (+311.11%)
Mutual labels:  color
luxpy
Python toolbox for lighting and color science
Stars: ✭ 55 (+205.56%)
Mutual labels:  color
nord-mintty
An arctic, north-bluish clean and elegant Mintty color theme.
Stars: ✭ 40 (+122.22%)
Mutual labels:  color
palette
Color palette app for elementary OS
Stars: ✭ 32 (+77.78%)
Mutual labels:  color
DDHTweaks
Tweak UI elements at run time to find the perfect values
Stars: ✭ 27 (+50%)
Mutual labels:  color
WaveLabelDemo
波浪经过文字,文字改变颜色。Waves pass through words, and words change colours.
Stars: ✭ 58 (+222.22%)
Mutual labels:  color
NamedColors.jl
More color names than you ever knew you wanted
Stars: ✭ 24 (+33.33%)
Mutual labels:  color
colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (+55.56%)
Mutual labels:  color
elm-color-extra
🎨 Additional color handling for Elm
Stars: ✭ 28 (+55.56%)
Mutual labels:  color
color-extractor
Biancoir is website that provide color extraction from an image with quantization algorithm.
Stars: ✭ 12 (-33.33%)
Mutual labels:  color
MNIST-invert-color
Invert the color of MNIST images with PyTorch
Stars: ✭ 13 (-27.78%)
Mutual labels:  color
BuenColors
R package of colors for the Buenrostro Lab
Stars: ✭ 53 (+194.44%)
Mutual labels:  color
LycricsTextView
No description or website provided.
Stars: ✭ 14 (-22.22%)
Mutual labels:  color
a-color-picker
A color picker for web app
Stars: ✭ 97 (+438.89%)
Mutual labels:  color
unblending
Decomposing an input image into layers via "color unblending"
Stars: ✭ 125 (+594.44%)
Mutual labels:  color
ColorPick.js
A simple and minimal jQuery color picker plugin for the modern web.
Stars: ✭ 48 (+166.67%)
Mutual labels:  color

color-rgba Build Status size stable

Convert color string to array with rgba channel values: "rgba(127,127,127,.1)"[127,127,127,.1].

Usage

npm install color-rgba

const rgba = require('color-rgba')

rgba('red') // [255, 0, 0, 1]
rgba('rgb(80, 120, 160)') // [80, 120, 160, 1]
rgba('rgba(80, 120, 160, .5)') // [80, 120, 160, .5]
rgba('hsla(109, 50%, 50%, .75)') // [87.125, 191.25, 63.75, .75]
rgba`rgb(80 120 160 / 50%)` // [80, 120, 160, .5]

API

let [r, g, b, alpha] = rgba(color)

Returns channels values as they are in the input color string argument. alpha is always from 0..1 range. color can be a CSS color string, an array with channel values, an object etc., see color-parse.

Related

License

(c) 2017 Dima Yv. MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].