# Converting Colors in JavaScript at 6 Billion Operations Per Second

Original title: Converting colors in JavaScript at 6B operations per second

> Hacker News story 48844554 · language: en · submitted 2026-07-09
> Web version: https://zeli.app/story/48844554
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 13 · by [dkryaklin](<https://news.ycombinator.com/user?id=dkryaklin>) · 💬 1
[original](<https://dkryaklin.com/blog/colordx-gpu>) · [HN discussion](<https://news.ycombinator.com/item?id=48844554>)

## Summary

I built @colordx/gpu to handle real-time color rendering by shifting heavy calculations from the CPU to the GPU. While my CPU-based library handles single conversions efficiently, rendering millions of pixels requires parallel processing. By sending mathematical rules instead of raw data to the fragment shader, I achieved over 6 billion color conversions per second on an Apple M4, outperforming the CPU by 400 times.

## Key quote

> When the tool actually fits the problem, the elaborate workarounds and hacks don't move into the code — they just disappear.

---

## Cite

- Page: https://zeli.app/story/48844554
- Date: 2026-07-09
- Source: dkryaklin.com (https://dkryaklin.com/blog/colordx-gpu)
- Hacker News: https://news.ycombinator.com/item?id=48844554

## Other languages

- zh: https://zeli.app/zh/story/48844554 · markdown: https://zeli.app/zh/story/48844554.md
- ja: https://zeli.app/ja/story/48844554 · markdown: https://zeli.app/ja/story/48844554.md
- ko: https://zeli.app/ko/story/48844554 · markdown: https://zeli.app/ko/story/48844554.md
- de: https://zeli.app/de/story/48844554 · markdown: https://zeli.app/de/story/48844554.md
- es: https://zeli.app/es/story/48844554 · markdown: https://zeli.app/es/story/48844554.md
