Added more tests

This commit is contained in:
Eduard Urbach 2024-03-12 15:23:08 +01:00
parent 71c74c800b
commit e0bfa137d5
Signed by: eduard
GPG key ID: 49226B848C78F6C8
10 changed files with 91 additions and 55 deletions

View file

@ -4,9 +4,6 @@ import (
"fmt"
)
// Value is a type definition for the data type of a single color component.
type Value = float64
// Color represents an RGB color.
type Color struct {
R Value
@ -14,11 +11,6 @@ type Color struct {
B Value
}
// RGB creates a new color with red, green and blue values in the range of 0.0 to 1.0.
func RGB(r Value, g Value, b Value) Color {
return Color{r, g, b}
}
// Print writes the text in the given color to standard output.
func (c Color) Print(args ...any) {
if !Terminal {