cute-colors
v1.0.2
Published
Collections of nice color palettes.
Downloads
13
Readme
cute-colors
Collections of nice color palettes.
:cloud: Installation
# Using npm
npm install --save cute-colors
# Using yarn
yarn add cute-colors
:clipboard: Example
const CuteColors = require("cute-colors")
console.log(CuteColors.getPalettes())
// => [ 'flat', 'material' ]
console.log(
CuteColors.getColors(
"flat"
// Use only half of the colors
, 0.5
)
)
// => { pomegranate: [ '#641e16', '#922b21', '#c0392b', '#d98880', '#f2d7d5' ],
// alizarin: [ '#78281f', '#b03a2e', '#e74c3c', '#f1948a', '#fadbd8' ],
// asbestos: [ '#424949', '#616a6b', '#7f8c8d', '#b2babb', '#e5e8e8' ],
// ...
// 'wet asphalt': [ '#1b2631', '#283747', '#34495e', '#85929e', '#d6dbdf' ],
// 'midnight blue': [ '#17202a', '#212f3d', '#2c3e50', '#808b96', '#d5d8dc' ] }
:question: Get Help
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. :bug:
:memo: Documentation
getColors(palette, percentage)
Gets the colors.
Params
- String
palette
: The palette name. - Number
percentage
: A value between 0 and 1 representing the fetching coverage (e.g.1
will select all the colors,0.5
half of them and so on).
Return
- Object An object containing the color names and their codes.
getPalettes()
Returns an array of palette names.
Return
- Array The palette names.
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.