{"id":13483288,"url":"https://github.com/fazibear/colorize","last_synced_at":"2025-05-14T02:00:13.881Z","repository":{"id":45116645,"uuid":"382449","full_name":"fazibear/colorize","owner":"fazibear","description":"Ruby string class extension. It add some methods to set color, background color and text effect on console easier using ANSI escape sequences.","archived":false,"fork":false,"pushed_at":"2024-05-21T23:51:26.000Z","size":207,"stargazers_count":1265,"open_issues_count":4,"forks_count":142,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-09T12:03:21.264Z","etag":null,"topics":["ansi-escape-sequences","gem","ruby"],"latest_commit_sha":null,"homepage":"http://rdoc.info/projects/fazibear/colorize","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fazibear.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2009-11-23T11:45:34.000Z","updated_at":"2025-05-03T13:12:01.000Z","dependencies_parsed_at":"2024-06-18T11:14:23.867Z","dependency_job_id":null,"html_url":"https://github.com/fazibear/colorize","commit_stats":{"total_commits":204,"total_committers":16,"mean_commits":12.75,"dds":"0.16176470588235292","last_synced_commit":"0fe2c548f69cfc842df45364c2d057b3d037e092"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazibear%2Fcolorize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazibear%2Fcolorize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazibear%2Fcolorize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazibear%2Fcolorize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fazibear","download_url":"https://codeload.github.com/fazibear/colorize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253417803,"owners_count":21905292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi-escape-sequences","gem","ruby"],"created_at":"2024-07-31T17:01:09.727Z","updated_at":"2025-05-14T02:00:13.707Z","avatar_url":"https://github.com/fazibear.png","language":"Ruby","funding_links":["https://www.patreon.com/bePatron?u=6912974"],"categories":["Ruby","Gems","CLI Utilities"],"sub_categories":["CLI"],"readme":"colorize [![Gem Version](https://badge.fury.io/rb/colorize.svg)](http://badge.fury.io/rb/colorize) [![Ruby Gem](https://github.com/fazibear/colorize/actions/workflows/release.yml/badge.svg)](https://github.com/fazibear/colorize/actions/workflows/release.yml) [![Code Climate](https://codeclimate.com/github/fazibear/colorize/badges/gpa.svg)](https://codeclimate.com/github/fazibear/colorize) [![Test Coverage](https://codeclimate.com/github/fazibear/colorize/badges/coverage.svg)](https://codeclimate.com/github/fazibear/colorize)\n========\n\nRuby gem for colorizing text using ANSI escape sequences.\nExtends `String` class or add a `ColorizedString` with methods to set the text color, background color and text effects.\n\nmodes\n-----\n\n* `require 'colorize'` - Extends String class\n* `require 'colorized_string'` - add ColorizedString class\n\nfeatures\n--------\n\n* change string color\n* change string background\n* change string effect\n* chain methods\n* display color samples\n* disable colorization\n* prevent colors\n\nusage\n-----\n\n```ruby\nrequire 'colorize'\n\nString.colors                       # return array of all possible colors names\nString.modes                        # return array of all possible modes\nString.color_samples                # displays color samples in all combinations\nString.disable_colorization         # check if colorization is disabled\n\n# disable colorization (false by default)\n\nString.disable_colorization = false # enable colorization\nString.disable_colorization false   # enable colorization\nString.disable_colorization = true  # disable colorization\nString.disable_colorization true    # disable colorization\n\n# prevent colors (false by default)\n\nString.prevent_colors = false # override current string colors\nString.prevent_colors false   # override current string colors\nString.prevent_colors = true  # don't colorize colorized strings\nString.prevent_colors true    # don't colorize colorized strings\n\n# adding aliases (:gray and :grey added by default)\n\nString.add_color_alias(:niebieski, :blue)\nString.add_color_alias(:zielony =\u003e :green)\nString.add_color_alias(czarny: :black)\nString.add_color_alias(czerwony: :red, granatowy: :blue)\n\n# examaples\n\nputs \"This is blue\".colorize(:blue)\nputs \"This is light blue\".colorize(:light_blue)\nputs \"This is also blue\".colorize(:color =\u003e :blue)\nputs \"This is bold green\".colorize(:color =\u003e :green, :mode =\u003e :bold)\nputs \"This is light blue with red background\".colorize(:color =\u003e :light_blue, :background =\u003e :red)\nputs \"This is light blue with red background\".colorize(:light_blue ).colorize( :background =\u003e :red)\nputs \"This is blue text on red\".blue.on_red\nputs \"This is red on blue\".colorize(:red).on_blue\nputs \"This is red on blue and underline\".colorize(:red).on_blue.underline\nputs \"This is blinking blue text on red\".blue.on_red.blink\nputs \"This is uncolorized\".blue.on_red.uncolorize\n```\n\n```ruby\nrequire 'colorized_string'\n\nColorizedString.colors                       # return array of all possible colors names\nColorizedString.modes                        # return array of all possible modes\nColorizedString.color_samples                # displays color samples in all combinations\nColorizedString.disable_colorization         # check if colorization is disabled\n\n# disable colorization (false by default)\n\nColorizedString.disable_colorization = false # enable colorization\nColorizedString.disable_colorization false   # enable colorization\nColorizedString.disable_colorization = true  # disable colorization\nColorizedString.disable_colorization true    # disable colorization\n\n# prevent colors (false by default)\n\nColorizedString.prevent_colors = false # override current string colors\nColorizedString.prevent_colors false   # override current string colors\nColorizedString.prevent_colors = true  # don't colorize colorized strings\nColorizedString.prevent_colors true    # don't colorize colorized strings\n\n# adding aliases (:gray and :grey added by default)\n\nColorizedString.add_color_alias(:niebieski, :blue)\nColorizedString.add_color_alias(:zielony =\u003e :green)\nColorizedString.add_color_alias(czarny: :black)\nColorizedString.add_color_alias(czerwony: :red, granatowy: :blue)\n\n# examples\n\nputs ColorizedString[\"This is blue\"].colorize(:blue)\nputs ColorizedString[\"This is light blue\"].colorize(:light_blue)\nputs ColorizedString[\"This is also blue\"].colorize(:color =\u003e :blue)\nputs ColorizedString[\"This is bold green\"].colorize(:color =\u003e :green, :mode =\u003e :bold)\nputs ColorizedString[\"This is light blue with red background\"].colorize(:color =\u003e :light_blue, :background =\u003e :red)\nputs ColorizedString[\"This is light blue with red background\"].colorize(:light_blue ).colorize( :background =\u003e :red)\nputs ColorizedString[\"This is blue text on red\"].blue.on_red\nputs ColorizedString[\"This is red on blue\"].colorize(:red).on_blue\nputs ColorizedString[\"This is red on blue and underline\"].colorize(:red).on_blue.underline\nputs ColorizedString[\"This is blinking blue text on red\"].blue.on_red.blink\nputs ColorizedString[\"This is uncolorized\"].blue.on_red.uncolorize\n\nputs ColorizedString.new(\"This is blue\").blue\nputs ColorizedString.new(\"This is light blue\").colorize(:light_blue)\n```\n\nrequirements\n------------\n\n* Win32/Console/ANSI (for Windows)\n\ninstall\n-------\n\n* gem install colorize\n\n*Note:* You may need to use sudo to install gems\n\nthank you\n---------\n\n[![Become Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?u=6912974)\n\nlicense\n-------\n\n    Copyright (C) 2007-2024 Michał Kalbarczyk\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffazibear%2Fcolorize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffazibear%2Fcolorize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffazibear%2Fcolorize/lists"}