frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

What every coder should know about Gamma Correction

https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/
21•sph•2d ago

Comments

LoganDark•1h ago
> Pixels with RGB values of (128, 128, 128) emit about half as much light as pixels with RGB values of (255, 255, 255).

Technically, this is not always incorrect, if your working color space is linear and 0 is no light. The problem only comes if you hand that same data to routines or surfaces expecting sRGB or another nonlinear color space (or one where 0 is not no light).

nomel•1h ago
> or one where 0 is not no light

Oh, interesting. What's an example of this? Some sort of log space?

LoganDark•1h ago
Oh, I was just listing the constraints. I'm not directly aware of a color space where value 0 is not no light. It would however mean that even if linear, doubling a value relative to 0 wouldn't necessarily double the amount of light.
pavlov•1h ago
Most video color spaces have black at a non-zero code value.

The most common 8-bit YUV format (e.g. in MPEG-2) uses a 16-235 range for valid luma values, so black is at 16 and white is at 235.

The reason for leaving this “headroom” and “footroom” had to do both with digitizing analog signals and avoiding clipping during processing.

Someone•59m ago
I would think the color spaces of most displays have that, don’t they?

The bevel of a black iPhone is darker than its screen, even when powered off. Similarly, switched off CRT displays aren’t truly black.

dheera•1h ago
> On which image does the gradation appear more even? It’s the second one!

I felt the first one looked more even. On the first I could tell the difference between every two adjacent bars. On the second one I couldn't tell any difference between the first 4-5 bars.

zokier•1h ago
for lot of image processing linearizing srgb is only half-way measure, and you might want to reach for a better colorspace altogether. cielab is obvious example, or maybe oklab/jzazbz/xyb/something else.
raphlinus•1h ago
Exactly this, there's rarely a single "correct" colorspace, you make a choice based on expressive goals and constraints. For example, for gradients you almost never want linear, something like Oklab is indeed much better.

The gradient examples between high-chroma colors of similar luminance are highly misleading in my opinion. In that particular case, linear just happens to do well (and device RGB of course poorly), but in other cases linear is not great. For example, blue to white is especially bad, with hue shifts as well as lightness non-uniformity.

You can experiment with this in the interactive tester in my Oklab review[1].

[1]: https://raphlinus.github.io/color/2021/01/18/oklab-critique....

A backdoor in a LinkedIn job offer

https://roman.pt/posts/linkedin-backdoor/
349•lwhsiao•2h ago•73 comments

US battery manufacturing output continues to break records

https://fred.stlouisfed.org/series/IPG33591S
80•epistasis•1h ago•43 comments

Iroh 1.0

https://www.iroh.computer/blog/v1
819•chadfowler•7h ago•259 comments

I Love the Computer

https://michaelenger.com/blog/i-love-the-computer/
68•speckx•2h ago•27 comments

Techno-libertarians are flocking to the Caribbean

https://economist.com/the-americas/2026/06/11/techno-libertarians-are-flocking-to-the-caribbean
23•andsoitis•43m ago•15 comments

TinyWind: A pixel pirate sailing game with real wind physics (380k+ kms sailed)

https://tinywind.io
500•tinywind•5h ago•102 comments

Ask HN: Has anyone replaced Claude/GPT with a local model for daily coding?

520•cloudking•7h ago•259 comments

My Homelab AI Dev Platform

https://rsgm.dev/post/ai-dev-platform/
190•rsgm•7h ago•39 comments

Game Engine White Papers Commander Keen

https://forgottenbytes.net/commander_keen.html
114•mfiguiere•4h ago•36 comments

Hetzner Price Adjustment

https://docs.hetzner.com/general/infrastructure-and-availability/price-adjustment/#cloud-servers
266•tuhtah•8h ago•386 comments

A calculator that doesn't round

https://constructive-calculator.dimview.org/writeup.html
23•dimview•3d ago•10 comments

How TimescaleDB compresses time-series data

https://roszigit.com/en/blog/timescaledb-compression-hypercore
91•lkanwoqwp•4h ago•13 comments

Factoring "short-sleeve" RSA keys with polynomials

https://blog.trailofbits.com/2026/06/12/factoring-short-sleeve-rsa-keys-with-polynomials/
58•ledoge•3d ago•1 comments

What every coder should know about Gamma Correction

https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/
21•sph•2d ago•8 comments

Show HN: Vet turned founder, AI lawn diagnosis

https://grassdx.com/
18•andrewbr•4h ago•8 comments

Show HN: Fata – Spaced repetition to fight skill rot from AI coding

https://fata.dev
61•djoume•4d ago•37 comments

The Dead Economy Theory

https://gmalandrakis.com/writings/ad-economicum.html
7•l0new0lf-G•1h ago•2 comments

Fox to buy Roku

https://www.wsj.com/business/deals/fox-roku-deal-f6e564f9
234•thm•9h ago•330 comments

Making glass-to-metal seals for home­made vacuum tubes

https://maurycyz.com/projects/glass/1/
116•zdw•1d ago•35 comments

Copper transport drug restores memory and clears toxic Alzheimer's proteins

https://www.monash.edu/news/articles/copper-drug-restores-memory-and-clears-toxic-alzheimers-prot...
215•bookofjoe•7h ago•80 comments

How memory safety CVEs differ between Rust and C/C++

https://kobzol.github.io/rust/2026/06/15/how-memory-safety-cves-differ-between-rust-and-c-cpp.html
88•nicoburns•6h ago•86 comments

What job interviews taught me about Kubernetes

https://notnotp.com/notes/what-job-interviews-taught-me-about-kubernetes/
14•chmaynard•2h ago•4 comments

Boot Naked Linux

https://nick.zoic.org/art/boot-naked-linux/
73•abnercoimbre•6h ago•35 comments

Launch HN: Drafted (YC P26) – Models for residential architecture

30•PrimalNick•5h ago•43 comments

Typst 0.15.0

https://typst.app/docs/changelog/0.15.0/
237•schu•4h ago•57 comments

Apple Foundation Models

https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/apple-foundation-models
457•MehrdadKhnzd•17h ago•214 comments

Commander Keen Games (free book)

https://forgottenbytes.net/
5•tzury•1h ago•0 comments

Show HN: machine0 – Persistent NixOS VMs You Control from the CLI

https://machine0.io
62•bwm•6h ago•28 comments

The Alaska Server

https://serialport.org/blog/the-alaska-server/
20•speckx•3h ago•5 comments

CrankGPT

https://crankgpt.com
529•rishikeshs•8h ago•210 comments