Added more tests

This commit is contained in:
2024-03-12 15:23:08 +01:00
parent 6a802c3ad8
commit 0e7bc76a0c
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 {