colorspace
Generate HEX colors for a given namespace.
Last updated 10 years ago by 3rdeden .
MIT · Original npm · Tarball · package.json
$ gnpm install colorspace 
SYNC missed versions from official npm registry.

colorspace

Colorspace is a simple module which generates HEX color codes for namespaces. The base color is decided by the first part of the namespace. All other parts of the namespace alters the color tone. This way you can visually see which namespaces belong together and which does not.

Installation

The module is released in the public npm registry and can be installed by running:

npm install --save colorspace

Usage

We assume that you've already required the module using the following code:

'use strict';

var colorspace = require('colorspace');

The returned function accepts 2 arguments:

  1. namespace string, The namespace that needs to have a HEX color generated.
  2. delimiter, string, optional, Delimiter to find the different sections of the namespace. Defaults to :

Example

console.log(colorspace('color')) // #6b4b3a
console.log(colorspace('color:space')) // #796B67

License

MIT

Current Tags

  • 1.1.4                                ...           latest (3 years ago)

7 Versions

  • 1.1.4                                ...           3 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           6 years ago
  • 1.1.1                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |