Created
July 15, 2015 20:30
-
-
Save icodeforlove/34006e1f84cf06efd503 to your computer and use it in GitHub Desktop.
String rgb support for console
This file contains hidden or 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.
Learn more about bidirectional Unicode characters
| String.prototype.rgb = function (r, g, b) { | |
| return "\x1b[38;2;" + r + ";" + g + ";" + b + "m" + this + "\x1b[0m"; | |
| }; |
Author
icodeforlove
commented
Jul 15, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment