Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/code-raisan/gocolor
Goでコンソールに出力する文字色を変えれます
https://github.com/code-raisan/gocolor
go golang golang-library golang-module
Last synced: about 1 month ago
JSON representation
Goでコンソールに出力する文字色を変えれます
- Host: GitHub
- URL: https://github.com/code-raisan/gocolor
- Owner: code-raisan
- License: mit
- Created: 2022-05-18T07:43:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T10:03:50.000Z (over 2 years ago)
- Last Synced: 2024-06-18T23:16:33.084Z (6 months ago)
- Topics: go, golang, golang-library, golang-module
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 23
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocolor
![](https://img.shields.io/github/stars/code-raisan/gocolor?style=flat-square)
Goでコンソールに出力する文字色を変えれます。
Change the color of characters output to the console with Go.
# How to use
## Install
```bash
go get github.com/code-raisan/gocolor@latest
```## Sample
`gocolor.Default()` を使用すると通常の文字色に戻すことができます
### 色文字の出力例
```go
package mainimport (
"github.com/code-raisan/gocolor"
)func main() {
// Out put is red
println(gocolor.Red("gocolor.Red()"))
// Out put is blue
println(gocolor.Blue("gocolor.Blue()"))
// Out put is yellow
println(gocolor.Yellow("gocolor.Yellow()"))
// Out put is green
println(gocolor.Green("gocolor.Green()"))
// Out put is purple(magenta)
println(gocolor.Purple("gocolor.Purple()"))
// Out put is cyan
println(gocolor.Cyan("gocolor.Cyan()"))
// Out put is white
println(gocolor.White("gocolor.White()"))
// Out put is black
println(gocolor.Black("gocolor.Black()"))
}```
![image](https://user-images.githubusercontent.com/67790884/169005087-cea1fecf-be46-47db-a2cb-8891b60c69b6.png)