{"repo":"janlelis/paint","free":true,"listed":false,"github":"https://github.com/janlelis/paint","clone":"git clone https://github.com/janlelis/paint.git","description":"Ruby gem for ANSI terminal colors 🎨︎ VERY FAST","language":"Ruby","stars":384,"topics":["ansi-colors","ruby","rgb-colors","fast","true-color","terminal","ansi","escape-sequences","ruby-cli"],"license":"MIT","category":"cli-tools","readme_excerpt":"Ruby Paint Paint creates terminal colors and effects for you. It combines the strengths of term-ansicolor , rainbow , and similar projects into a simple to use, however still flexible terminal colors gem with no core extensions by default. Features No string extensions (suitable for library development) Simple API Faster than other terminal color gems (as of January 2024) Supports true color or 256 colors (for capable terminals) Allows you to set any terminal effects Paint.mode : Fall-back modes for terminals with less colors, supported modes: 0xFFFFFF (= 16777215) colors ( true color ) 256 colors (palette) 16 colors (only ANSI colors, combined with bright effect) 8 colors (only ANSI colors) 0 colors (no colors / deactivate) Paint 2.0 True Color Support Starting with Paint 2.0 , true color mode is the new default mode, since most major terminals now support 24bit colors. If it happens to not work in your setup: - Manually set Paint.mode = 256 at the beginning of your code - Please open a new issue so we can figure out how to blacklist the terminal used Setup Add to Gemfile : and run bundle install . In Ruby do: Usage The only method you need is: Paint.[] The first argument given to Paint.[] is the string to colorize (if the object is not a string, to s will be called on it). The other arguments describe how to modify/colorize the string. Let's learn by example: When you pass multiple colors, the first one is taken as foreground color and the second one defines the background ","default_branch":null,"files":null,"tree":[],"storefront":"/r/janlelis","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/janlelis/paint/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}