From 1ff0f9790840e92e289b824302f71b465c426735 Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Wed, 27 Mar 2024 10:28:56 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Bruno Schaatsbergen --- README.md | 2 +- color.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eafc142..a5748f9 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ color.Magenta("And many others ..") ### RGB colors -If your terminal supports 24-bit colors, you can use RGB color codes +If your terminal supports 24-bit colors, you can use RGB color codes. ```go color.RGB(255, 128, 0).Println("foreground orange") diff --git a/color.go b/color.go index 1b1f034..ee39b40 100644 --- a/color.go +++ b/color.go @@ -99,7 +99,7 @@ const ( FgCyan FgWhite - // used internally for 256 and 24bit coloring + // used internally for 256 and 24-bit coloring foreground ) @@ -126,7 +126,7 @@ const ( BgCyan BgWhite - // used internally for 256 and 24bit coloring + // used internally for 256 and 24-bit coloring background ) @@ -156,12 +156,12 @@ func New(value ...Attribute) *Color { return c } -// RGB returns a newly created foreground 24-bit RGB color. +// RGB returns a new foreground color in 24-bit RGB. func RGB(r, g, b int) *Color { return New(foreground, 2, Attribute(r), Attribute(g), Attribute(b)) } -// BgRGB returns a newly created 24-bit background RGB color. +// BgRGB returns a new background color in 24-bit RGB. func BgRGB(r, g, b int) *Color { return New(background, 2, Attribute(r), Attribute(g), Attribute(b)) }