Should you normalize RGB values by 255 or 256?

·Hacker News··

30fps.net — Computer Graphics & Programming with Pekka Väänänen Should you normalize RGB values by 255 or 256? June 1st, 2026 Let’s say you’re writing an image processing program. The program takes in an image, converts it to floating point, does some processing and finally saves the modified pixels to disk as 8-bit colors. The question today concerns how exactly the integer-to-float conversion should be done. There are two approaches which, written in Python and NumPy, look like this: Standard

Read full article →

Related Articles

Anthropic S-1
SiNTEx · Hacker News · 16h ago
Solar power is becoming bigger than nuclear
geox · Hacker News · 14h ago
The Exponential Time Hypothesis Is False [pdf]
vok · Hacker News · 7h ago
Oldest GUI application that still runs on Windows 11
enlyth · Hacker News · 11h ago
Type Server Protocol
adamnemecek · Hacker News · 11h ago