Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific color conversion bug #1

Open
somnus-L opened this issue Aug 26, 2020 · 0 comments
Open

Specific color conversion bug #1

somnus-L opened this issue Aug 26, 2020 · 0 comments

Comments

@somnus-L
Copy link

`
//pink r 255,g 191, b 204
//crimson r 219, g 20, b 60
//magenta r 255, g 0, b 255
// blue r 0 g 0 b 255

h, s, _ := colorsys.Rgb2Hsv(r, g, b)
s = s * 1000
fmt.Printf("rgbl(%v,%v,%v) => hsv(%x,%x)", r, g, b, uint(h), uint(s))
`
result:
"rgbl(255,191,204,50) => hsv(fffffffffffffff4,fa)"
"rgbl(219,20,60,50) => hsv(fffffffffffffff4,38c)"
"rgbl(255,0,255,50) => hsv(ffffffffffffffc4,3e8)"
"rgbl(0,0,255,50) => hsv(f0,3e8)"

Why do the above three colors appear like "fffff...." after conversion ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant