Socket
Socket
Sign inDemoInstall

color-seed

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-seed

Predictable colors generator from a seed


Version published
Maintainers
1
Created
Source

color-seed

npm package

Stable colors generator from given seed(s).

Based on seedrandom, chroma-js Spectral scale.

sample

Install

npm install color-seed

Usage

  colorSeed
    colorSeed.getColor : single seed
      ✓ getColor("Paris") should return #a70b44
      ✓ getColor("Marseille") should return #7acaa5
      ✓ getColor("Bordeaux") should return #9ed8a4
    colorSeed.getColors : multiple seed
      ✓ getColors(["Paris", "Marseille", "Bordeaux"]) should return #a70b44, #7acaa5, #9ed8a4
      ✓ getColors(["Paris", "Marseille", "Bordeaux", "xxx"]) should return #a70b44, #7acaa5, #9ed8a4, #3683bb

  5 passing (13ms)

FAQs

Package last updated on 19 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc