百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

colorize

> 编程语言
开源

Ruby 字符串类扩展。它添加了一些方法,以便更方便地使用 ANSI 逃逸序列来设置控制台上的颜色、背景颜色和文本效果。

1.3K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Ruby 字符串类扩展。它添加了一些方法,以便更方便地使用 ANSI 逃逸序列来设置控制台上的颜色、背景颜色和文本效果。

colorize

Ruby gem for colorizing text using ANSI escape sequences. Extends String class or add a ColorizedString with methods to set the text color, background color and text effects.

modes

  • require 'colorize' - Extends String class
  • require 'colorized_string' - add ColorizedString class

features

  • change string color
  • change string background
  • change string effect
  • chain methods
  • display color samples
  • disable colorization
  • prevent colors

usage

…
…

requirements

  • Win32/Console/ANSI (for Windows)

install

  • gem install colorize

Note: You may need to use sudo to install gems

thank you

license

Copyright (C) 2007-2024 Michał Kalbarczyk

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyansi-escape-sequencesgemruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言