Ejemplo n.º 1
0
func ExampleBytes() {
	data := []byte("â–ˆ")

	h, s, l := rgbterm.RGBtoHSL(252, 255, 43)
	for i := 0; i < 80; i++ {
		h += (5.0 / 360.0)
		if h > 1.0 {
			h = 0.0
		}
		r, g, b := rgbterm.HSLtoRGB(h, s, l)
		fmt.Printf("%s", rgbterm.Bytes(data, r, g, b))
	}
	fmt.Println()

	// Output:
	// ████████████████████████████████████████████████████████████████████████████████

}
Ejemplo n.º 2
0
func ExampleBytes() {
	data := []byte("â–ˆ")

	h, s, l := rgbterm.RGBtoHSL(252, 255, 43)
	for i := 0; i < 80; i++ {
		h += (5.0 / 360.0)
		if h > 1.0 {
			h = 0.0
		}
		r, g, b := rgbterm.HSLtoRGB(h, s, l)
		fmt.Printf("%s", rgbterm.Bytes(data, r, g, b, 0, 0, 0)) //b, g, r))
	}
	fmt.Println()

	// Output:
	// ████████████████████████████████████████████████████████████████████████████████

}