Added more tests
This commit is contained in:
8
Color.go
8
Color.go
@ -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 {
|
||||
|
Reference in New Issue
Block a user