File: chat-websocket/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js

Recommend this page to a friend!
  Classes of Igor Escobar   Terminal Crossword   chat-websocket/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js   Download  
File: chat-websocket/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Terminal Crossword
Generate a crosswords board on a text console
Author: By
Last change:
Date: 2 years ago
Size: 1,160 bytes
 

Contents

Class file image Download
var styles = { 'bold': ['\033[1m', '\033[22m'], 'italic': ['\033[3m', '\033[23m'], 'underline': ['\033[4m', '\033[24m'], 'inverse': ['\033[7m', '\033[27m'], 'black': ['\033[30m', '\033[39m'], 'red': ['\033[31m', '\033[39m'], 'green': ['\033[32m', '\033[39m'], 'yellow': ['\033[33m', '\033[39m'], 'blue': ['\033[34m', '\033[39m'], 'magenta': ['\033[35m', '\033[39m'], 'cyan': ['\033[36m', '\033[39m'], 'white': ['\033[37m', '\033[39m'], 'default': ['\033[39m', '\033[39m'], 'grey': ['\033[90m', '\033[39m'], 'bgBlack': ['\033[40m', '\033[49m'], 'bgRed': ['\033[41m', '\033[49m'], 'bgGreen': ['\033[42m', '\033[49m'], 'bgYellow': ['\033[43m', '\033[49m'], 'bgBlue': ['\033[44m', '\033[49m'], 'bgMagenta': ['\033[45m', '\033[49m'], 'bgCyan': ['\033[46m', '\033[49m'], 'bgWhite': ['\033[47m', '\033[49m'], 'bgDefault': ['\033[49m', '\033[49m'] } Object.keys(styles).forEach(function(style) { Object.defineProperty(String.prototype, style, { get: function() { return styles[style][0] + this + styles[style][1]; }, enumerable: false }); });