Closed
Description
Ran into an example with the base16-builder-go where grabbing a value from a hex string and then outputting the rgb values then converting them back to hex isn't matching up.
Here's an example:
package main
import (
"fmt"
"github.com/lucasb-eyer/go-colorful"
)
func main() {
color, _ := colorful.Hex("#4a4543")
r, g, b := color.RGB255()
fmt.Printf("#%02x%02x%02x\n", r, g, b)
}
As you can see the input value is #4a4543
but (on my machine) it outputs #494543
.
Metadata
Metadata
Assignees
Labels
No labels