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

palette-genius

v1.0.2

Published

a package that generates random color palettes based on a specified brand

Downloads

15

Readme

Palette Genius

Palette Genius is a Node.js package that generates random color palettes based on a specified brand. You can also specify a custom number of colors for each palette.

Brands

['spotify', 'apple', 'microsoft', 'intel', 'dell', 'hp', 'lenovo', 'asus', 'acer', 'lg', 'samsung', 'sony', 'nintendo', 'playstation', 'xbox', 'logitech', 'razer', 'corsair', 'steelseries', 'hyperx', 'kingston', 'western-digital', 'seagate', 'sandisk', 'toshiba', 'sony-music', 'universal-music', 'warner-music', 'netflix', 'amazon', 'google', 'facebook', 'twitter', 'instagram', 'tiktok', 'snapchat', 'pinterest']

Installation

To install Palette Genius, use NPM:

npm install palette-genius

Usage

First, import the generatePalette function from the palette-genius module:

const { generatePalette } = require('palette-genius');

Then, call the generatePalette function with two arguments: numColors and theme. numColors specifies how many colors should be in the generated palette, while theme represents the desired mood or theme. Here's an example usage:

const palette = generatePalette(5, 'instagram');
console.log(palette);

This will generate an array of 5 instagram colors and log them to the console.

Themes

Themes consists of a pre-defined set of colors that are designed to evoke a certain mood or feeling. Here's how you can generate a palette using each of these themes:

instagram

The "instagram" theme consists of bright, bold colors that are ideal for creating eye-catching designs. To generate a instagram palette, use the following code:

const palette = generatePalette(5, 'instagram');

microsoft

The "microsoft" theme consists of soft, muted colors that are perfect for creating subtle and calming designs. To generate a microsoft palette, use the following code:

const palette = generatePalette(5, 'microsoft');

samsung

The "samsung" theme consists of warm, natural colors that are ideal for creating designs that feel organic and grounded. To generate an samsung palette, use the following code:

const palette = generatePalette(5, 'samsung');

Custom Colors

If you want to create a palette using custom colors, you can pass an array of color values as the theme argument instead of one of the pre-defined themes. For example, here's how you could generate a palette using shades of blue:

const palette = generatePalette(5, ['#003f5c', '#2f4b7c', '#665191', '#a05195', '#d45087']);

Custom Number of Colors

By default, Palette Genius generates palettes with 7 colors. However, you can specify a custom number of colors by passing an integer value as the numColors argument. For example, if you wanted to generate a palette with only 3 colors, you would use the following code:

const palette = generatePalette(3, 'instagram');

Credits

Palette Genius was created by George Chakama.