Socket
Book a DemoInstallSign in
Socket

colorful-it

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colorful-it

colorful chars

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

ColorfulIt

Add colorful chars to element.

sample

Inspired by the banner at http://substack.net/.

install

With NPM:

npm install colorful-it

usage

Require it:

var ColorfulIt = require('colorful-it');
ColorfulIt(document.getElementById('colorfulCharsContainer'), 'Hello, world!');

Or use the global var:

ColorfulIt(document.getElementById('colorfulCharsContainer'), 'Hello, world!');

Or use as jQuery plugin (if you import jQuery before):

$('#colorfulCharsContainer').ColorfulIt('Hello, world!');

api

  • ColorfulIt(ele, str, options)

    options:

    • seed: seed colors used to colorful chars, like [[255,255,0],[0,255,255],...]
    • stepNum: insert colors between every two colors in seed to get the Colors to be used
    • interval: speed of the change of colors, in millisecond
  • ColorfulIt.prototype

    • run() - after stoped, use it to restart changing color
    • stop() - stop changing color

test

npm install
npm test

Keywords

colurful

FAQs

Package last updated on 15 Aug 2015

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