New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chromahash

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chromahash

Hash strings to colors

0.1.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

Travis Build Status npm

chromahash

Hash strings into colors

Usage

npm install chromahash
const chromahash = require('chromahash')

const rgbHex = chromahash('chromahash') // returns a rgb hex color

Why

  • You have strings and want to associate colors to them
  • You want those color associations to be deterministic
  • You can't be bothered to pre-associate words with colours

Say you have a decentralized or offline application, and your users want to tag things and those tags should be have colours. Your users want these colours to be consistent across devices and for their friends. You need to hash the tags into colours... chromahash!

Keywords

color

FAQs

Package last updated on 13 Oct 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