Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
  • Loading branch information
fatih and bschaatsbergen committed Oct 3, 2024
1 parent 5723903 commit 1ff0f97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions color.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const (
FgCyan
FgWhite

// used internally for 256 and 24bit coloring
// used internally for 256 and 24-bit coloring
foreground
)

Expand All @@ -126,7 +126,7 @@ const (
BgCyan
BgWhite

// used internally for 256 and 24bit coloring
// used internally for 256 and 24-bit coloring
background
)

Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit 1ff0f97

Please sign in to comment.