Skip to content

Commit

Permalink
fixup! fixup! fixup! remove unused and expose default color palette
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Feb 21, 2025
1 parent 6748926 commit b1ce404
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansi/sixel/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ func ConvertChannel(c uint32) uint32 {
// FromColor returns a Sixel color from a color.Color. It converts the color
// channels to the 0-100 range.
func FromColor(c color.Color) Color {
if c == nil {
return Color{}
}

r, g, b, _ := c.RGBA()
return Color{
Pu: 2, // Always use RGB format "2"
Expand Down

0 comments on commit b1ce404

Please sign in to comment.