qrcode

package
v0.0.0-...-2946602 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	White = color.RGBA{
		R: 255,
		G: 255,
		B: 255,
		A: 255,
	}
	Black = color.RGBA{
		R: 0,
		G: 0,
		B: 0,
		A: 255,
	}
	Yellow = color.RGBA{
		R: 255,
		G: 255,
		B: 0,
		A: 255,
	}
	LightBlue = color.RGBA{
		R: 0,
		G: 255,
		B: 255,
		A: 255,
	}
	Blue = color.RGBA{
		R: 0,
		G: 0,
		B: 255,
		A: 255,
	}
	Red = color.RGBA{
		R: 255,
		G: 0,
		B: 0,
		A: 255,
	}
	Pink = color.RGBA{
		R: 255,
		G: 0,
		B: 255,
		A: 255,
	}
	LightPurple = color.RGBA{
		R: 127,
		G: 0,
		B: 255,
		A: 255,
	}
	Green = color.RGBA{
		R: 0,
		G: 255,
		B: 0,
		A: 255,
	}
	Orange = color.RGBA{
		R: 255,
		G: 127,
		B: 0,
		A: 255,
	}
)

这是一坨定义好的颜色,可以往里面加颜色,看你们喜欢

Functions

func CreateQRCode

func CreateQRCode(content string, bkColor, picColor color.RGBA, size int) ([]byte, error)

CreateQRCode 创建二维码 注意:此处的RGBA的A 不是百分制 而是 0-255

func TransferColor

func TransferColor(colorStr string, transparency float64) (rgba color.RGBA, err error)

TransferColor 十六进制转 RGBA颜色

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL