all repos — honk @ c647edf71634c84a8889ed0c3dcfcbc94aa184ec

my fork of honk

better color balance and contrast for avatars
Ted Unangst tedu@tedunangst.com
Fri, 10 May 2019 17:29:30 -0400
commit

c647edf71634c84a8889ed0c3dcfcbc94aa184ec

parent

4c20c40e22eeecda9750a142b007f5e922d67dea

1 files changed, 7 insertions(+), 7 deletions(-)

jump to
M avatar.goavatar.go

@@ -33,24 +33,24 @@ p := i*img.Stride + j*4

xx := i/16*16 + j/16 x := s[xx] if x < 64 { - img.Pix[p+0] = 32 + img.Pix[p+0] = 16 img.Pix[p+1] = 0 - img.Pix[p+2] = 64 + img.Pix[p+2] = 48 img.Pix[p+3] = 255 } else if x < 128 { - img.Pix[p+0] = 32 + img.Pix[p+0] = 48 img.Pix[p+1] = 0 - img.Pix[p+2] = 92 + img.Pix[p+2] = 96 img.Pix[p+3] = 255 } else if x < 192 { - img.Pix[p+0] = 64 + img.Pix[p+0] = 72 img.Pix[p+1] = 0 - img.Pix[p+2] = 128 + img.Pix[p+2] = 144 img.Pix[p+3] = 255 } else { img.Pix[p+0] = 96 img.Pix[p+1] = 0 - img.Pix[p+2] = 160 + img.Pix[p+2] = 192 img.Pix[p+3] = 255 } }