diff --git a/.gitignore b/.gitignore index 26b0a26..7dbfd92 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ !*.go !*.md !*.mod -!*.sum \ No newline at end of file +!*.sum diff --git a/bench_test.go b/Benchmarks_test.go similarity index 99% rename from bench_test.go rename to Benchmarks_test.go index d5c215d..c811429 100644 --- a/bench_test.go +++ b/Benchmarks_test.go @@ -34,4 +34,4 @@ func BenchmarkPrintRaw(b *testing.B) { for b.Loop() { c.Print("") } -} \ No newline at end of file +} diff --git a/Color.go b/Color.go index 2ea19f8..5b007c9 100644 --- a/Color.go +++ b/Color.go @@ -39,4 +39,4 @@ func (c Color) Println(args ...any) { } fmt.Printf("\x1b[38;2;%d;%d;%dm%s\n\x1b[0m", c.R, c.G, c.B, fmt.Sprint(args...)) -} \ No newline at end of file +} diff --git a/Color_test.go b/Color_test.go index 7979032..1abfa15 100644 --- a/Color_test.go +++ b/Color_test.go @@ -52,4 +52,4 @@ func TestPrintln(t *testing.T) { color.RGB(1, 0, 0).Println("red") color.RGB(0, 1, 0).Println("green") color.RGB(0, 0, 1).Println("blue") -} \ No newline at end of file +} diff --git a/HSL.go b/HSL.go index 867eee0..f5cda9a 100644 --- a/HSL.go +++ b/HSL.go @@ -26,4 +26,4 @@ func HSL(hue Value, saturation Value, lightness Value) Color { m := lightness - c/2 return RGB(r+m, g+m, b+m) -} \ No newline at end of file +} diff --git a/HSL_test.go b/HSL_test.go index 6eec2c9..0c3e654 100644 --- a/HSL_test.go +++ b/HSL_test.go @@ -23,4 +23,4 @@ func TestHSLSpectrum(t *testing.T) { fmt.Println() } -} \ No newline at end of file +} diff --git a/HSV.go b/HSV.go index 9e375e7..2efa5fd 100644 --- a/HSV.go +++ b/HSV.go @@ -26,4 +26,4 @@ func HSV(hue Value, saturation Value, value Value) Color { m := value - c return RGB(r+m, g+m, b+m) -} \ No newline at end of file +} diff --git a/HSV_test.go b/HSV_test.go index 643baf0..c2b4bd3 100644 --- a/HSV_test.go +++ b/HSV_test.go @@ -23,4 +23,4 @@ func TestHSVSpectrum(t *testing.T) { fmt.Println() } -} \ No newline at end of file +} diff --git a/LCH.go b/LCH.go index 054de9c..c27d4df 100644 --- a/LCH.go +++ b/LCH.go @@ -57,4 +57,4 @@ func oklabToLinearRGB(lightness Value, a Value, b Value) (Value, Value, Value) { blue := -0.0041960863*l - 0.7034186147*m + 1.7076147010*s return red, green, blue -} \ No newline at end of file +} diff --git a/LCH_test.go b/LCH_test.go index 53c0e72..59e9097 100644 --- a/LCH_test.go +++ b/LCH_test.go @@ -48,4 +48,4 @@ func TestLCHSpectrum(t *testing.T) { fmt.Println() } -} \ No newline at end of file +} diff --git a/readme.md b/README.md similarity index 100% rename from readme.md rename to README.md diff --git a/RGB.go b/RGB.go index 0539cbd..3d94abc 100644 --- a/RGB.go +++ b/RGB.go @@ -33,4 +33,4 @@ func sRGB(x Value) Value { } return 1.0 -} \ No newline at end of file +} diff --git a/RGB_test.go b/RGB_test.go index 569a2db..a1f4481 100644 --- a/RGB_test.go +++ b/RGB_test.go @@ -26,4 +26,4 @@ func TestRGB(t *testing.T) { for name, c := range rgbColors { c.Println("█ " + name) } -} \ No newline at end of file +} diff --git a/Terminal.go b/Terminal.go index 575940d..e47cf17 100644 --- a/Terminal.go +++ b/Terminal.go @@ -10,4 +10,4 @@ import ( var Terminal = tty.IsTerminal(os.Stdout.Fd()) // TrueColor indicates if the terminal has 24-bit color support. -var TrueColor = os.Getenv("COLORTERM") == "truecolor" \ No newline at end of file +var TrueColor = os.Getenv("COLORTERM") == "truecolor" diff --git a/Value.go b/Value.go index 808e410..42635f1 100644 --- a/Value.go +++ b/Value.go @@ -1,4 +1,4 @@ package color // Value is a type definition for the data type of a single color component. -type Value = float64 \ No newline at end of file +type Value = float64 diff --git a/ansi/Code.go b/ansi/Code.go index 896857f..46c68bd 100644 --- a/ansi/Code.go +++ b/ansi/Code.go @@ -37,4 +37,4 @@ func (code Code) Println(args ...any) { } fmt.Printf("\x1b[%dm%s\n\x1b[0m", code, fmt.Sprint(args...)) -} \ No newline at end of file +} diff --git a/ansi/Code_test.go b/ansi/Code_test.go index e7f5311..64a1f47 100644 --- a/ansi/Code_test.go +++ b/ansi/Code_test.go @@ -52,4 +52,4 @@ func testPrintln() { ansi.Yellow.Println("Yellow") ansi.Magenta.Println("Magenta") ansi.Cyan.Println("Cyan") -} \ No newline at end of file +} diff --git a/ansi/Color.go b/ansi/Color.go index b06e991..65bacda 100644 --- a/ansi/Color.go +++ b/ansi/Color.go @@ -9,4 +9,4 @@ const ( Magenta Cyan White -) \ No newline at end of file +) diff --git a/ansi/Format.go b/ansi/Format.go index 2876cd0..29bfcf6 100644 --- a/ansi/Format.go +++ b/ansi/Format.go @@ -11,4 +11,4 @@ const ( Reverse Hidden Strikethrough -) \ No newline at end of file +) diff --git a/go.mod b/go.mod index 61c2d73..c3152ec 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module git.urbach.dev/go/color go 1.24 -require golang.org/x/sys v0.31.0 \ No newline at end of file +require golang.org/x/sys v0.31.0 diff --git a/go.sum b/go.sum index cfac067..c55261f 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= \ No newline at end of file +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= diff --git a/tty/Terminal_bsd.go b/tty/Terminal_bsd.go index 5579b86..15e06e0 100644 --- a/tty/Terminal_bsd.go +++ b/tty/Terminal_bsd.go @@ -8,4 +8,4 @@ import "golang.org/x/sys/unix" func IsTerminal(fd uintptr) bool { _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) return err == nil -} \ No newline at end of file +} diff --git a/tty/Terminal_linux.go b/tty/Terminal_linux.go index 8e74a33..023c564 100644 --- a/tty/Terminal_linux.go +++ b/tty/Terminal_linux.go @@ -8,4 +8,4 @@ import "golang.org/x/sys/unix" func IsTerminal(fd uintptr) bool { _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) return err == nil -} \ No newline at end of file +} diff --git a/tty/Terminal_other.go b/tty/Terminal_other.go index 3e34252..3ea5ee8 100644 --- a/tty/Terminal_other.go +++ b/tty/Terminal_other.go @@ -5,4 +5,4 @@ package tty // IsTerminal is always false on unsupported platforms. func IsTerminal(fd uintptr) bool { return false -} \ No newline at end of file +} diff --git a/tty/Terminal_test.go b/tty/Terminal_test.go index bbce9d1..1f1a097 100644 --- a/tty/Terminal_test.go +++ b/tty/Terminal_test.go @@ -9,4 +9,4 @@ import ( func TestIsTerminal(t *testing.T) { tty.IsTerminal(os.Stdout.Fd()) -} \ No newline at end of file +} diff --git a/tty/Terminal_windows.go b/tty/Terminal_windows.go index 6786198..0bf1927 100644 --- a/tty/Terminal_windows.go +++ b/tty/Terminal_windows.go @@ -9,4 +9,4 @@ func IsTerminal(fd uintptr) bool { var mode uint32 err := windows.GetConsoleMode(windows.Handle(fd), &mode) return err == nil -} \ No newline at end of file +}