Added HSL and HSV colors

This commit is contained in:
2025-03-11 14:24:41 +01:00
parent 1b0b4cb28f
commit f75ff8da5a
14 changed files with 153 additions and 48 deletions

View File

@ -8,12 +8,14 @@ import (
func TestPrint(t *testing.T) {
color.Terminal = true
color.TrueColor = true
color.RGB(1, 0, 0).Print("red\n")
color.RGB(0, 1, 0).Print("green\n")
color.RGB(0, 0, 1).Print("blue\n")
color.Terminal = false
color.TrueColor = false
color.RGB(1, 0, 0).Print("red\n")
color.RGB(0, 1, 0).Print("green\n")
@ -22,12 +24,14 @@ func TestPrint(t *testing.T) {
func TestPrintf(t *testing.T) {
color.Terminal = true
color.TrueColor = true
color.RGB(1, 0, 0).Printf("%s\n", "red")
color.RGB(0, 1, 0).Printf("%s\n", "green")
color.RGB(0, 0, 1).Printf("%s\n", "blue")
color.Terminal = false
color.TrueColor = false
color.RGB(1, 0, 0).Printf("%s\n", "red")
color.RGB(0, 1, 0).Printf("%s\n", "green")
@ -36,12 +40,14 @@ func TestPrintf(t *testing.T) {
func TestPrintln(t *testing.T) {
color.Terminal = true
color.TrueColor = true
color.RGB(1, 0, 0).Println("red")
color.RGB(0, 1, 0).Println("green")
color.RGB(0, 0, 1).Println("blue")
color.Terminal = false
color.TrueColor = false
color.RGB(1, 0, 0).Println("red")
color.RGB(0, 1, 0).Println("green")