@turbocolor/colorshelll
Version:
Show Colors In The Node.js Repl
2 lines • 4.36 kB
JavaScript
document.write('<link rel="stylesheet" href="https://github.githubassets.com/assets/gist-embed-5687a589e344.css">')
document.write('<div id=\"gist116470212\" class=\"gist\">\n <div class=\"gist-file\" translate=\"no\">\n <div class=\"gist-data\">\n <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n <div id=\"file-colorshelll-rb\" class=\"file my-2\">\n \n <div itemprop=\"text\" class=\"Box-body p-0 blob-wrapper data type-ruby \">\n\n \n<div class=\"js-check-bidi js-blob-code-container blob-code-content\">\n\n <template class=\"js-file-alert-template\">\n <div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n <path fill-rule=\"evenodd\" d=\"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z\"><\/path>\n<\/svg>\n \n <span>\n This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n <a href=\"https://github.co/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a>\n <\/span>\n\n\n <div data-view-component=\"true\" class=\"flash-action\"> <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\"> Show hidden characters\n \n<\/a>\n<\/div>\n<\/div><\/template>\n<template class=\"js-line-alert-template\">\n <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\">\n <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n <path fill-rule=\"evenodd\" d=\"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z\"><\/path>\n<\/svg>\n<\/span><\/template>\n\n <table class=\"highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file\" data-tab-size=\"8\" data-paste-markdown-skip data-tagsearch-lang=\"Ruby\" data-tagsearch-path=\"colorshelll.rb\">\n <tr>\n <td id=\"file-colorshelll-rb-L1\" class=\"blob-num js-line-number js-code-nav-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n <td id=\"file-colorshelll-rb-LC1\" class=\"blob-code blob-code-inner js-file-line\"><span class=pl-en>print<\/span> <span class=pl-s>"<span class=pl-cce>\\033<\/span>[31m■ Red Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[32m■ Green Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[33m■ Yellow Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[34m■ Blue Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[35m■ Magenta Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[36m■ Cyan Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[37m■ White Foreground<span class=pl-cce>\\n<\/span><span class=pl-cce>\\033<\/span>[30m■ Black Foreground<span class=pl-cce>\\n<\/span>"<\/span><\/td>\n <\/tr>\n <\/table>\n<\/div>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n <div class=\"gist-meta\">\n <a href=\"https://gist.github.com/DWhirlpool/3c0d4c29cc3a4a85ca85d31fa4d9a0c2/raw/c03d95dac34089d7f6668a6a4bdecdf1c3c8d298/colorshelll.rb\" style=\"float:right\">view raw<\/a>\n <a href=\"https://gist.github.com/DWhirlpool/3c0d4c29cc3a4a85ca85d31fa4d9a0c2#file-colorshelll-rb\">\n colorshelll.rb\n <\/a>\n hosted with ❤ by <a>Turbocolor Source<\/a>\n <\/div>\n <\/div>\n<\/div>\n')