isabella232 / mruby-ansi-colors Goto Github PK
View Code? Open in Web Editor NEWThis project forked from katzer/mruby-ansi-colors
Extends String class to use ANSI color escape codes.
License: MIT License
This project forked from katzer/mruby-ansi-colors
Extends String class to use ANSI color escape codes.
License: MIT License
# mruby-ansi-colors Extends String class to use ANSI color escape codes. # Returns an Hash with every color code pair. "".color_codes => {:black=>30, :light_black=>90, :bg_black=>40, :bg_light_black=>100, :red=>31, :light_red=>91, :bg_red=>41, :bg_light_red=>101, :green=>32, :light_green=>92, :bg_green=>42, :bg_light_green=>102, :yellow=>33, :light_yellow=>93, :bg_yellow=>43, :bg_light_yellow=>103, :blue=>34, :light_blue=>94, :bg_blue=>44, :bg_light_blue=>104, :magenta=>35, :light_magenta=>95, :bg_magenta=>45, :bg_light_magenta=>105, :cyan=>36, :light_cyan=>96, :bg_cyan=>46, :bg_light_cyan=>106, :white=>37, :light_white=>97, :bg_white=>47, :bg_light_white=>107, :default=>39, :bg_default=>49} # Returns and Array of Symbols representing every color. "".colors => [:black, :light_black, :bg_black, :bg_light_black, :red, :light_red, :bg_red, :bg_light_red, :green, :light_green, :bg_green, :bg_light_green, :yellow, :light_yellow, :bg_yellow, :bg_light_yellow, :blue, :light_blue, :bg_blue, :bg_light_blue, :magenta, :light_magenta, :bg_magenta, :bg_light_magenta, :cyan, :light_cyan, :bg_cyan, :bg_light_cyan, :white, :light_white, :bg_white, :bg_light_white, :default, :bg_default] # Returns a Hash of mode codes(different state the text can be displayed in). "".mode_codes => {:default=>0, :bold=>1, :italic=>3, :underline=>4, :blink=>5, :swap=>7, :hide=>8} default: 0, # Turn off all attributes bold: 1, # Set bold mode italic: 3, # Set italic mode underline: 4, # Set underline mode blink: 5, # Set blink mode swap: 7, # Exchange foreground and background colors hide: 8 # Hide text (foreground color would be the same as background) # Returns and Array of modes. "".modes => [:default, :bold, :italic, :underline, :blink, :swap, :hide] # Sets the strings color, and mode. String.set_color(fg_color, bg_color = :bg_default, mode = :default) "".set_color(:red, :bg_blue, :bold) alias color # Example Using this library is as easy as this: "My dog is red!".red
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.