internal/f32color: correct pre-multipled color conversion

Tweak a test color to avoid an off-by-1 rounding error after changing
the conversion formula.

Fixes gio#192

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-01-15 16:01:18 +01:00
parent 85c0a7d803
commit 01d5e72291
3 changed files with 23 additions and 8 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ func TestFramebuffers(t *testing.T) {
fbo1 := newFBO(t, b, sz)
fbo2 := newFBO(t, b, sz)
var (
col1 = color.NRGBA{R: 0xac, G: 0xbe, B: 0xef, A: 0xde}
col1 = color.NRGBA{R: 0xac, G: 0xbd, B: 0xef, A: 0xde}
col2 = color.NRGBA{R: 0xfe, G: 0xba, B: 0xbe, A: 0xca}
)
fcol1, fcol2 := f32color.LinearFromSRGB(col1), f32color.LinearFromSRGB(col2)