Socket
Socket
Sign inDemoInstall

couleurs

Package Overview
Dependencies
1
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couleurs

Convert any string to the nearest Terminal color using x256 library.


Version published
Weekly downloads
3.6K
decreased by-15.72%
Maintainers
1
Install size
11.6 kB
Created
Weekly downloads
 

Readme

Source

Couleurs

Convert any string to the nearest Terminal color using x256 library.

Example

var Couleurs = require ("couleurs");
console.log("Hi!".rgb(255, 255, 0)); // outputs "Hi!"
console.log("Hi!".rgb("#ffc")); // outputs "Hi!"

Test

$ npm test

How to use

After including the library, you can do:

console.log("Any string".rgb(...)

The arguments of the .rgb method represent the rgb color values.

Changelog

v0.2.0

  • Handle hex color codes

v0.1.x

  • Initial releases.

License

See LICENSE file.

Keywords

FAQs

Last updated on 20 May 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc