Skip to content

Commit

Permalink
update method comments
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Dec 2, 2020
1 parent 079365c commit c489f16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion color_rgb.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func (c RGBColor) C256() Color256 {
}

// C16 returns the closest approximate 256 (8 bit) color

This comment has been minimized.

Copy link
@Delta456

Delta456 Dec 2, 2020

This should be 16 instead of 256.

// refer https://github.com/radareorg/radare2/blob/master/libr/cons/rgb.c#L249-L271
func (c RGBColor) C16() Color {
return Color(RgbToAnsi(c[0], c[1], c[2], c[3] == AsBg))
}
Expand Down
1 change: 1 addition & 0 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ func Rgb2ansi(r, g, b uint8, isBg bool) uint8 {
}

// RgbToAnsi convert RGB-code to 16-code
// refer https://github.com/radareorg/radare2/blob/master/libr/cons/rgb.c#L249-L271
func RgbToAnsi(r, g, b uint8, isBg bool) uint8 {
var bright, c, k uint8

Expand Down

0 comments on commit c489f16

Please sign in to comment.