npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easy-palette

v1.1.9

Published

an easy way to generate color palette, based on color theory

Downloads

959

Readme

image

Color-Palette Generator 🎨

A simple package allowing you to create color s easily.

About 📰

Hi i am adrian, a college student wanting to do stuff, this package will allow you to create color palette easily, even knowing the name of the color given.

installation 🌏

for javascript you can install using npm install (i)

npm install @adr-ian/color-palette

usage 📰

color Palette Generation 🌈

generate simple color palette

import {Analogus} from "color-palette"

let color = Analogus(10)

this will generate a random color palette using Analogus color theory

[ [ '267ef0' ],[ 'b324e3' ],[ 'fa202f' ],[ '000000' ],[ '074219' ] ]

My Logo Generation method

  • Monochromatic
  • Analogus
  • Square
  • Triadic
  • Complimentary

Parameters

there is 6 parameter. 1 Parameter for Amount of Color is mandatory, and the other is

  • Hex (default is True)
  • RGB (default is False)
  • CMYK (default is False)
  • HSB (default is False)
  • Real Name (default is False)
import {Analogus} from "color-palette"

let color = Monochromatic(10, {
    hex: true, 
    rgb: true, 
    cmyk: true, 
    realName: true, 
    hsb: true
})

the code provided will generate data as follows

let color = [
 [
    '281e5e', //hex
    [ 40, 30, 94 ], //rgb
    [ 57, 68, 0, 63 ], //cmyk
    [ 249, 68, 37 ], //hsb
    'Intergalactic Cowboy' //real name
  ]
]

Color Blindness Manipulation 🦯

currently this package support 7 type of color blindness

Color blindness support
  • Protanopia (weak red)
  • Deuteranopia (weak green)
  • Tritanopia (weak blue)
  • Protanomaly (Blind red)
  • Deuteranomaly (Blind green)
  • Tritanomaly (Blind blue)
  • Achromatopsia (Total Color Blindness)

to use, put "simulate" in front of the color blindness, and the para meter will be rgb, and the result will be a list of [R, G, B]

import {simulateProtanopia} from "color-palette"

let colorBlind = simulateProtanopia(250,202,56)

//colorBlind = [ 229, 228, 91 ]

//simulateProtanopia (r, g b)
//simulateDeuteranopia (r, g b)
//simulateTritanopia (r, g b)
//simulateProtanomaly (r, g b)
//simulateDeuteranomaly (r, g b)
//simulateTritanomaly (r, g b)
//simulateAchromatopsia (r, g b)

Alt text

Color Conversion Support 💁‍♂️

this package also helps you to convert color from one type to other type

Color Conversion Support
  • HSB to HEX
  • HSB to RGB
  • HSB to CMYK
  • HEX to RGB
  • RGB to HEX
import {hsbToHex} from "color-palette"

let color = hsbToHex(h, s, b)

// let color = hsbToCmyk(h, s, b)
// let color = hsbToRgb(h, s, b)
// let color = hexToRgb(hex)
// let color = rgbToHex(r, g, b)

//hex = 'faca38'
//rgb = [r, g, b]
//cmyk = [c, m, y, k]
//hsb = [h, s, b]

the return will be a list, excepet for hex, hex result will be the hex code without the "#"

Color Naming Support 🔥

this package support name to color, with precision of 30.200 color, this also takes refrence from NTC.Js.

Alt text

import {ntc} from "color-palette"

let colorName  = ntc.name("faca38")
//colorName = sunGlow