Showoff Saturday: I made a progressive-enhancement API for HDR web highlights
I wanted to see whether the extra brightness range on modern HDR displays could be useful for ordinary webpages, not just video.
The result is Brightpixels, a dependency-free library built around two custom elements:
```html <bright-text intensity="12">Important words</bright-text>
<bright-image intensity="8"> <img src="/photo.jpg" alt="Reflective metal" /> </bright-image> ```
On compatible setups it renders through an extended-range WebGPU canvas. Everywhere else, the original DOM text or image remains visible, so it works as progressive enhancement.
Text stays selectable, image alt text is preserved, and there's a React 19 entry with TypeScript declarations.
The project is at 0.1.0 and I'm looking for feedback on the API and device compatibility—particularly from people with HDR laptops and monitors.
[link] [留言] Read original: https://www.reddit.com/r/webdev/comments/1w8cg2i/showoff_saturday_i_made_a_progressiveenhancement/
原文:https://www.a8q9.cn/en/article/en-showoff-saturday-i-made-a-progressive-enhancement-api-for-hd.html