diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-24 01:08:45 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-11-24 01:08:45 -0500 |
commit | c8bcf5289f1b6c364f6f0237b1bf4ccad4e1dcd2 (patch) | |
tree | 6caffa28f14f92be4711c91887c83db74f4460af /internal/colors | |
parent | ec84a4f1dca36a18c93b9f96e262cca34853c086 (diff) |
Improve Stringer color interfaces
Diffstat (limited to 'internal/colors')
-rw-r--r-- | internal/colors/cmyk.go | 2 | ||||
-rw-r--r-- | internal/colors/hsl.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/colors/cmyk.go b/internal/colors/cmyk.go index b5ef223..30bc290 100644 --- a/internal/colors/cmyk.go +++ b/internal/colors/cmyk.go @@ -13,7 +13,7 @@ type CMYK struct { } func (c CMYK) String() string { - return fmt.Sprintf("cmyk(%d, %d, %d, %d)", c.C, c.M, c.Y, c.K) + return fmt.Sprintf("cmyk(%d%%, %d%%, %d%%, %d%%)", c.C, c.M, c.Y, c.K) } func (c CMYK) ToPrecise() PreciseColor { diff --git a/internal/colors/hsl.go b/internal/colors/hsl.go index 2a31f81..51a1785 100644 --- a/internal/colors/hsl.go +++ b/internal/colors/hsl.go @@ -12,7 +12,7 @@ type HSL struct { } func (h HSL) String() string { - return fmt.Sprintf("hsl(%d, %d, %d)", h.H, h.S, h.L) + return fmt.Sprintf("hsl(%d, %d%%, %d%%)", h.H, h.S, h.L) } func (h HSL) ToPrecise() PreciseColor { |