Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

color2html

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color2html

Convert ANSII color characters to html

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31
increased by287.5%
Maintainers
1
Weekly downloads
 
Created
Source

color2html.js

Convert ANSII color characters to html. With this module, you can convert your colorful log into clear html.

Example

var color2html = require('color2html');
var str = '\033[32mhello, world\033[39m';
console.log(color2html(str));
// <font color="green">hello, world</font>

str = '\033[1m\033[32mhello, \033[39m\033[22m\033[34mworld\033[39m';
console.log(color2html(str));
// <b><font color="green">hello, </font></b><font color="blue">world</font>

str = '\033[4mhello world\033[24m';
console.log(color2html(str));
// <font style="text-decoration: underline;">hello world</font>

Keywords

FAQs

Package last updated on 08 May 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc