Skip to content

打印出有颜色的字,仅对windows下的控制台有用

Notifications You must be signed in to change notification settings

BeanWei/colorprint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

在windows终端中输出颜色字体

测试

$ go run test.go
package main

import (
	"github.com/BeanWei/colorprint"
)

func main() {

	colorprint.Print("Hello\n", colorprint.Deepblue)
	colorprint.Print("Hello\n", colorprint.Green)
	colorprint.Print("Hello\n", colorprint.Skyblue)
	colorprint.Print("Hello\n", colorprint.Red)
	colorprint.Print("Hello\n", colorprint.Purple)
	colorprint.Print("Hello\n", colorprint.Yellow)
	colorprint.Print("Hello\n", colorprint.White)
}

效果

Alt text

About

打印出有颜色的字,仅对windows下的控制台有用

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages