nv-css-color
v1.0.0
Published
css color utils
Downloads
3
Maintainers
Readme
nv-css-color
- nv-css-color is a simple util for css-color
- css-color-prompt
- css-color-trans
install
- npm install nv-css-color
usage
example
const nvclr = require("nv-css-color")
> nvclr.color.seashell()
'seashell'
> nvclr.color.$to_rgb()
'rgb(255,245,238)'
> nvclr.color.$to_hsl()
'hsl(24,100%,97%)'
>
> nvclr.color.rgb(252, 3, 3)
'rgb(252,3,3)'
> nvclr.color.$to_numerical()
'#fc0303ff'
> nvclr.color.val()
'rgb(252,3,3)'
> nvclr.color.$to_hsl()
'hsl(0,98%,50%)'
>
> nvclr.color.numerical(0xfc0303)
'#fc0303'
> nvclr.color.$to_rgb()
'rgb(252,3,3)'
> nvclr.color.$to_rgba()
'rgb(252,3,3,1.0)'
>
API
###color
> nvclr.color.$to_
nvclr.color.$to_hsl nvclr.color.$to_hsla
nvclr.color.$to_named nvclr.color.$to_numerical
nvclr.color.$to_rgb nvclr.color.$to_rgba
> nvclr.color
Color {
transparent: [Function: transparent],
aliceblue: [Function: aliceblue],
antiquewhite: [Function: antiquewhite],
aqua: [Function: aqua],
aquamarine: [Function: aquamarine],
azure: [Function: azure],
beige: [Function: beige],
bisque: [Function: bisque],
black: [Function: black],
blanchedalmond: [Function: blanchedalmond],
blue: [Function: blue],
blueviolet: [Function: blueviolet],
brown: [Function: brown],
burlywood: [Function: burlywood],
cadetblue: [Function: cadetblue],
chartreuse: [Function: chartreuse],
chocolate: [Function: chocolate],
coral: [Function: coral],
cornflowerblue: [Function: cornflowerblue],
cornsilk: [Function: cornsilk],
crimson: [Function: crimson],
cyan: [Function: cyan],
darkblue: [Function: darkblue],
darkcyan: [Function: darkcyan],
darkgoldenrod: [Function: darkgoldenrod],
darkgray: [Function: darkgray],
darkgreen: [Function: darkgreen],
darkgrey: [Function: darkgrey],
darkkhaki: [Function: darkkhaki],
darkmagenta: [Function: darkmagenta],
darkolivegreen: [Function: darkolivegreen],
darkorange: [Function: darkorange],
darkorchid: [Function: darkorchid],
darkred: [Function: darkred],
darksalmon: [Function: darksalmon],
darkseagreen: [Function: darkseagreen],
darkslateblue: [Function: darkslateblue],
darkslategray: [Function: darkslategray],
darkslategrey: [Function: darkslategrey],
darkturquoise: [Function: darkturquoise],
darkviolet: [Function: darkviolet],
deeppink: [Function: deeppink],
deepskyblue: [Function: deepskyblue],
dimgray: [Function: dimgray],
dimgrey: [Function: dimgrey],
dodgerblue: [Function: dodgerblue],
firebrick: [Function: firebrick],
floralwhite: [Function: floralwhite],
forestgreen: [Function: forestgreen],
fuchsia: [Function: fuchsia],
gainsboro: [Function: gainsboro],
ghostwhite: [Function: ghostwhite],
gold: [Function: gold],
goldenrod: [Function: goldenrod],
gray: [Function: gray],
green: [Function: green],
greenyellow: [Function: greenyellow],
grey: [Function: grey],
honeydew: [Function: honeydew],
hotpink: [Function: hotpink],
indianred: [Function: indianred],
indigo: [Function: indigo],
ivory: [Function: ivory],
khaki: [Function: khaki],
lavender: [Function: lavender],
lavenderblush: [Function: lavenderblush],
lawngreen: [Function: lawngreen],
lemonchiffon: [Function: lemonchiffon],
lightblue: [Function: lightblue],
lightcoral: [Function: lightcoral],
lightcyan: [Function: lightcyan],
lightgoldenrodyellow: [Function: lightgoldenrodyellow],
lightgray: [Function: lightgray],
lightgreen: [Function: lightgreen],
lightgrey: [Function: lightgrey],
lightpink: [Function: lightpink],
lightsalmon: [Function: lightsalmon],
lightseagreen: [Function: lightseagreen],
lightskyblue: [Function: lightskyblue],
lightslategray: [Function: lightslategray],
lightslategrey: [Function: lightslategrey],
lightsteelblue: [Function: lightsteelblue],
lightyellow: [Function: lightyellow],
lime: [Function: lime],
limegreen: [Function: limegreen],
linen: [Function: linen],
magenta: [Function: magenta],
maroon: [Function: maroon],
mediumaquamarine: [Function: mediumaquamarine],
mediumblue: [Function: mediumblue],
mediumorchid: [Function: mediumorchid],
mediumpurple: [Function: mediumpurple],
mediumseagreen: [Function: mediumseagreen],
mediumslateblue: [Function: mediumslateblue],
mediumspringgreen: [Function: mediumspringgreen],
mediumturquoise: [Function: mediumturquoise],
mediumvioletred: [Function: mediumvioletred],
midnightblue: [Function: midnightblue],
mintcream: [Function: mintcream],
mistyrose: [Function: mistyrose],
moccasin: [Function: moccasin],
navajowhite: [Function: navajowhite],
navy: [Function: navy],
oldlace: [Function: oldlace],
olive: [Function: olive],
olivedrab: [Function: olivedrab],
orange: [Function: orange],
orangered: [Function: orangered],
orchid: [Function: orchid],
palegoldenrod: [Function: palegoldenrod],
palegreen: [Function: palegreen],
paleturquoise: [Function: paleturquoise],
palevioletred: [Function: palevioletred],
papayawhip: [Function: papayawhip],
peachpuff: [Function: peachpuff],
peru: [Function: peru],
pink: [Function: pink],
plum: [Function: plum],
powderblue: [Function: powderblue],
purple: [Function: purple],
rebeccapurple: [Function: rebeccapurple],
red: [Function: red],
rosybrown: [Function: rosybrown],
royalblue: [Function: royalblue],
saddlebrown: [Function: saddlebrown],
salmon: [Function: salmon],
sandybrown: [Function: sandybrown],
seagreen: [Function: seagreen],
seashell: [Function: seashell],
sienna: [Function: sienna],
silver: [Function: silver],
skyblue: [Function: skyblue],
slateblue: [Function: slateblue],
slategray: [Function: slategray],
slategrey: [Function: slategrey],
snow: [Function: snow],
springgreen: [Function: springgreen],
steelblue: [Function: steelblue],
tan: [Function: tan],
teal: [Function: teal],
thistle: [Function: thistle],
tomato: [Function: tomato],
turquoise: [Function: turquoise],
violet: [Function: violet],
wheat: [Function: wheat],
white: [Function: white],
whitesmoke: [Function: whitesmoke],
yellow: [Function: yellow],
yellowgreen: [Function: yellowgreen],
rgb: [Function: rgb],
rgba: [Function: rgba],
hsl: [Function: hsl],
hsla: [Function: hsla]
}
>
###util
> nvclr.util
{
prepend: [Function: prepend],
split_numerical: [Function: split_numerical],
numericalarr_to_rgbarr: [Function: numericalarr_to_rgbarr],
numerical_to_rgbarr: [Function: numerical_to_rgbarr],
is_numerical_rgb: [Function: is_numerical_rgb],
is_numerical_rgba: [Function: is_numerical_rgba],
hue_to_rgb: [Function: hue_to_rgb],
rgb_to_rgbstr: [Function: rgb_to_rgbstr],
rgb_to_rgba: [Function: rgb_to_rgba],
rgb_to_rgbastr: [Function: rgb_to_rgbastr],
rgb_to_numerical: [Function: rgb_to_numerical],
rgb_to_hsl: [Function: rgb_to_hsl],
rgb_to_hslstr: [Function: rgb_to_hslstr],
rgb_to_hsla: [Function: rgb_to_hsla],
rgb_to_hslastr: [Function: rgb_to_hslastr],
rgb_to_named: [Function: rgb_to_named],
rgba_to_rgb: [Function: rgba_to_rgb],
rgba_to_rgbstr: [Function: rgba_to_rgbstr],
rgba_to_rgbastr: [Function: rgba_to_rgbastr],
rgba_to_numerical: [Function: rgba_to_numerical],
rgba_to_hsl: [Function: rgba_to_hsl],
rgba_to_hslstr: [Function: rgba_to_hslstr],
rgba_to_hsla: [Function: rgba_to_hsla],
rgba_to_hslastr: [Function: rgba_to_hslastr],
rgba_to_named: [Function: rgba_to_named],
rgbstr_to_rgb: [Function: rgbstr_to_rgb],
rgbstr_to_rgba: [Function: rgbstr_to_rgba],
rgbstr_to_rgbastr: [Function: rgbstr_to_rgbastr],
rgbstr_to_numerical: [Function: rgbstr_to_numerical],
rgbstr_to_hsl: [Function: rgbstr_to_hsl],
rgbstr_to_hslstr: [Function: rgbstr_to_hslstr],
rgbstr_to_hsla: [Function: rgbstr_to_hsla],
rgbstr_to_hslastr: [Function: rgbstr_to_hslastr],
rgbstr_to_named: [Function: rgbstr_to_named],
rgbastr_to_rgb: [Function: rgbastr_to_rgb],
rgbastr_to_rgba: [Function: rgbastr_to_rgba],
rgbastr_to_numerical: [Function: rgbastr_to_numerical],
rgbastr_to_hsl: [Function: rgbastr_to_hsl],
rgbastr_to_hslstr: [Function: rgbastr_to_hslstr],
rgbastr_to_hsla: [Function: rgbastr_to_hsla],
rgbastr_to_hslastr: [Function: rgbastr_to_hslastr],
rgbastr_to_named: [Function: rgbastr_to_named],
numerical_to_rgb: [Function: numerical_to_rgbarr],
numerical_to_rgba: [Function: numerical_to_rgbarr],
numerical_to_rgbstr: [Function: numerical_to_rgbstr],
numerical_to_rgbastr: [Function: numerical_to_rgbastr],
numerical_to_hsl: [Function: numerical_to_hsl],
numerical_to_hslstr: [Function: numerical_to_hslstr],
numerical_to_hsla: [Function: numerical_to_hsla],
numerical_to_hslastr: [Function: numerical_to_hslastr],
numerical_to_named: [Function: numerical_to_named],
hsl_to_rgb: [Function: hsl_to_rgb],
hsl_to_rgba: [Function: hsl_to_rgba],
hsl_to_rgbstr: [Function: hsl_to_rgbstr],
hsl_to_rgbastr: [Function: hsl_to_rgbastr],
hsl_to_numerical: [Function: hsl_to_numerical],
hsl_to_hslstr: [Function: hsl_to_hslstr],
hsl_to_hsla: [Function: hsl_to_hsla],
hsl_to_hslastr: [Function: hsl_to_hslastr],
hsl_to_named: [Function: hsl_to_named],
hslstr_to_rgb: [Function: hslstr_to_rgb],
hslstr_to_rgba: [Function: hslstr_to_rgba],
hslstr_to_rgbstr: [Function: hslstr_to_rgbstr],
hslstr_to_rgbastr: [Function: hslstr_to_rgbastr],
hslstr_to_numerical: [Function: hslstr_to_numerical],
hslstr_to_hsl: [Function: hslstr_to_hsl],
hslstr_to_hsla: [Function: hslstr_to_hsla],
hslstr_to_hslastr: [Function: hslstr_to_hslastr],
hslstr_to_named: [Function: hslstr_to_named],
hsla_to_rgb: [Function: hsla_to_rgb],
hsla_to_rgba: [Function: hsla_to_rgba],
hsla_to_rgbstr: [Function: hsla_to_rgbstr],
hsla_to_rgbastr: [Function: hsla_to_rgbastr],
hsla_to_numerical: [Function: hsla_to_numerical],
hsla_to_hsl: [Function: hsla_to_hsl],
hsla_to_hslstr: [Function: hsla_to_hslstr],
hsla_to_hslastr: [Function: hsla_to_hslastr],
hsla_to_named: [Function: hsla_to_named],
hslastr_to_rgb: [Function: hslastr_to_rgb],
hslastr_to_rgba: [Function: hslastr_to_rgba],
hslastr_to_rgbstr: [Function: hslastr_to_rgbstr],
hslastr_to_rgbastr: [Function: hslastr_to_rgbastr],
hslastr_to_numerical: [Function: hslastr_to_numerical],
hslastr_to_hsl: [Function: hslastr_to_hsl],
hslastr_to_hslstr: [Function: hslastr_to_hslstr],
hslastr_to_hsla: [Function: hslastr_to_hsla],
hslastr_to_named: [Function: hslastr_to_named],
fullfill_named_clrs_dict_to_array: [Function: fullfill_named_clrs_dict_to_array],
sort_named_clrs: [Function: sort_named_clrs],
named_to_numerical: [Function: named_to_numerical],
named_to_rgb: [Function: named_to_rgb],
named_to_rgbstr: [Function: named_to_rgbstr],
named_to_rgba: [Function: named_to_rgba],
named_to_rgbastr: [Function: named_to_rgbastr],
named_to_hsl: [Function: named_to_hsl],
named_to_hslstr: [Function: named_to_hslstr],
named_to_hsla: [Function: named_to_hsla],
named_to_hslastr: [Function: named_to_hslastr],
ERROR_DICT: {
str_length_must_be_3_4_6_8: Error: str-length-must-be-3-4-6-8
}
LICENSE
- ISC