https://github.com/fatih/color

ansi color coloring go golang

Last synced: about 23 hours ago

Repository metadata:

Color package for Go (golang)


Owner metadata:


Committers metadata

Last synced: 2 days ago

Total Commits: 148
Total Committers: 38
Avg Commits per committer: 3.895
Development Distribution Score (DDS): 0.48

Commits in past year: 11
Committers in past year: 4
Avg Commits per committer in past year: 2.75
Development Distribution Score (DDS) in past year: 0.545

Name Email Commits
Fatih Arslan f****n@g****m 77
dependabot[bot] 4****] 22
Greg Poirson g****n@y****r 7
Robert Pająk p****d@h****m 4
bogem a****a@g****m 3
bl-ue 5****e 2
zdd z****b@g****m 2
Dmitry Savintsev d****s 1
Martin Lindhe m****n@u****e 1
Linda_pp r****d 1
Leo Correa l****5@g****m 1
Ilya Brin 4****n 1
Edward Betts e****d@4****m 1
Erik Hollensbe g****b@h****g 1
Cenk Altı c****i@g****m 1
Cameron Moore m****n@g****m 1
Andrey Rubtsov a****v@g****m 1
Andrew Austin a****t@g****m 1
Andreas Deininger a****s@d****t 1
Galvao Diniz Jonathan j****n@o****m 1
Harshavardhana h****a@h****t 1
Herman Schaaf h****f@g****m 1
Hyunsoo Shin h****a@k****r 1
Jeff Willette j****8@g****m 1
Klaus Post k****t@g****m 1
Marc Abramowitz m****c@m****m 1
Marwan Sulaiman m****k@g****m 1
Maximilian m****x@m****z 1
Raphael Pierzina r****l@h****e 1
Sinan Yasar s****n@k****m 1
and 8 more...

Issue and Pull Request metadata

Last synced: 2 days ago


Package metadata

go: github.com/fatih/color

Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: However, there are times when custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. You can create PrintXxx functions to simplify even more: You can also FprintXxx functions to pass your own io.Writer: Or create SprintXxx functions to mix strings with other non-colorized strings: Windows support is enabled by default. All Print functions work as intended. However, only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: You can also disable the color by setting the NO_COLOR environment variable to any value. It also has support for single color definitions (local). You can disable/enable color output on the fly:

  • Homepage: https://github.com/fatih/color
  • Documentation: https://pkg.go.dev/github.com/fatih/color#section-documentation
  • Licenses: MIT
  • Latest release: v1.16.0 (published about 1 year ago)
  • Last Synced: 2024-11-11T01:32:48.734Z (2 days ago)
  • Versions: 21
  • Dependent Packages: 39,081
  • Dependent Repositories: 101,086
  • Docker Downloads: 53,428,545,902
  • Rankings:
    • Docker downloads count: 0.003%
    • Dependent packages count: 0.006%
    • Dependent repos count: 0.011%
    • Average: 0.405%
    • Stargazers count: 0.837%
    • Forks count: 1.167%
go: github.com/fatih/Color

Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: However there are times where custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. You can create PrintXxx functions to simplify even more: You can also FprintXxx functions to pass your own io.Writer: Or create SprintXxx functions to mix strings with other non-colorized strings: Windows support is enabled by default. All Print functions work as intended. However only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: It also has support for single color definitions (local). You can disable/enable color output on the fly:

  • Homepage: https://github.com/fatih/Color
  • Documentation: https://pkg.go.dev/github.com/fatih/Color#section-documentation
  • Licenses: MIT
  • Latest release: v1.16.0 (published about 1 year ago)
  • Last Synced: 2024-11-11T01:32:50.136Z (2 days ago)
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 53
  • Rankings:
    • Dependent repos count: 0.789%
    • Stargazers count: 0.84%
    • Forks count: 1.167%
    • Average: 2.813%
    • Dependent packages count: 8.456%
go: github.com/Fatih/color

Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: However there are times where custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. You can create PrintXxx functions to simplify even more: You can also FprintXxx functions to pass your own io.Writer: Or create SprintXxx functions to mix strings with other non-colorized strings: Windows support is enabled by default. All Print functions work as intended. However only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: It also has support for single color definitions (local). You can disable/enable color output on the fly:

  • Homepage: https://github.com/Fatih/color
  • Documentation: https://pkg.go.dev/github.com/Fatih/color#section-documentation
  • Licenses: MIT
  • Latest release: v1.16.0 (published about 1 year ago)
  • Last Synced: 2024-11-11T01:32:50.323Z (2 days ago)
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 0.728%
    • Forks count: 0.747%
    • Average: 4.455%
    • Dependent packages count: 6.999%
    • Dependent repos count: 9.346%
go: github.com/Fatih/Color

Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: However there are times where custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. You can create PrintXxx functions to simplify even more: You can also FprintXxx functions to pass your own io.Writer: Or create SprintXxx functions to mix strings with other non-colorized strings: Windows support is enabled by default. All Print functions work as intended. However only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: It also has support for single color definitions (local). You can disable/enable color output on the fly:

  • Homepage: https://github.com/Fatih/Color
  • Documentation: https://pkg.go.dev/github.com/Fatih/Color#section-documentation
  • Licenses: MIT
  • Latest release: v1.16.0 (published about 1 year ago)
  • Last Synced: 2024-11-11T01:32:50.099Z (2 days ago)
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 0.73%
    • Forks count: 0.748%
    • Average: 4.456%
    • Dependent packages count: 6.999%
    • Dependent repos count: 9.346%
go: github.com/fatih/coloR

Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: However there are times where custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. You can create PrintXxx functions to simplify even more: You can also FprintXxx functions to pass your own io.Writer: Or create SprintXxx functions to mix strings with other non-colorized strings: Windows support is enabled by default. All Print functions work as intended. However only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: It also has support for single color definitions (local). You can disable/enable color output on the fly:

  • Homepage: https://github.com/fatih/coloR
  • Documentation: https://pkg.go.dev/github.com/fatih/coloR#section-documentation
  • Licenses: MIT
  • Latest release: v1.16.0 (published about 1 year ago)
  • Last Synced: 2024-11-11T01:32:49.993Z (2 days ago)
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%

Dependencies

go.mod go
  • github.com/mattn/go-colorable v0.1.12
  • github.com/mattn/go-isatty v0.0.14
go.sum go
  • github.com/mattn/go-colorable v0.1.12
  • github.com/mattn/go-isatty v0.0.14
  • golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
  • golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6
.github/workflows/go.yml actions
  • actions/checkout v3 composite
  • actions/setup-go v3 composite
  • dominikh/staticcheck-action v1.2.0 composite