Skip to content

Bloggify/cute-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

cute-colors

Version Downloads

Collections of nice color palettes.

โ˜๏ธ Installation

# Using npm
npm install --save cute-colors

# Using yarn
yarn add cute-colors

๐Ÿ“‹ 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' ] }

โ“ Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. ๐Ÿ›

๐Ÿ“ 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.

๐Ÿ˜‹ How to contribute

Have an idea? Found a bug? See how to contribute.

๐Ÿ“œ License

MIT ยฉ Bloggify