Socket
Socket
Sign inDemoInstall

color-seed

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "color-seed",
"description": "Predictable colors generator from a seed",
"version": "1.1.0",
"version": "1.1.1",
"author": "Julien Bouquillon <julien@revolunet.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -7,3 +7,3 @@ # color-seed

Based on [seedrandom](https://github.com/davidbau/seedrandom) and [chroma-js](http://gka.github.io/chroma.js) Spectral scale.
Based on [seedrandom](https://github.com/davidbau/seedrandom), [chroma-js](http://gka.github.io/chroma.js) Spectral scale.

@@ -10,0 +10,0 @@ ![sample](./sample.png)

@@ -5,3 +5,3 @@ var seedrandom = require('seedrandom');

const getPredictibleRandom = seed => {
function getPredictibleRandom(seed) {
Math.seedrandom(seed);

@@ -13,5 +13,9 @@ return Math.random();

const getColor = (seed) => DEFAULT_SCALE(getPredictibleRandom(seed)).hex()
function getColor(seed){
return DEFAULT_SCALE(getPredictibleRandom(seed)).hex()
}
const getColors = seeds => seeds.map(r => getColor(r));
function getColors(seeds) {
return seeds.map(r => getColor(r));
}

@@ -18,0 +22,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc