material-random-color-picker
this is for material design's color library.
motivation
sometimes, I need a color when I make mock design or framework in markup. it's slightly troublesome to choose color and check design. additionally, I'm usually using React.js or lit-html or something which generates HTML from javascript.
if it can be used like uuid, that would be nice, so I made it!
Example
Example page is here
and Example code is here
USAGE
first, you need below.
$ yarn add material-random-color-picker
or
$ npm i material-random-color-picker
and then, you need to import mrcp()
.
; // it will be rendered color randamly like #FFFFFF;
API
Basically, I refered to material design's color. Especially this page
if you got confused how to set option such as color
, type
, and level
, please refer above page.
mrcp(option)
option
: type is objectcolor
: default isnull
and type is stringtype
: default isnull
and type is stringlevel
: default isnull
and type is numberisObject
: default is false and type is boolean
// #ef9a9a // { code: "#84ffff", color: "cyan", id: 109, level:1, type: "accent" }// just in case, id is a internal id. you don't need to care of it.