Slug: wasm-luma-01 · Paired reading: Chapter 25
Prompt
fn luma_rgb(r: u8, g: u8, b: u8) -> u8 using Rec.601:
(r*299 + g*587 + b*114) / 1000.
The curriculum, drills, tutor, and interviewer mode are for readers of Ace the Rust Interview. The code is printed in the Preface (Companion site access).
Don’t have the book yet? Get it on Amazon (US and other storefronts linked in the site footer) — the Preface access code unlocks this gym.
advanced · order 163
Slug: wasm-luma-01 · Paired reading: Chapter 25
fn luma_rgb(r: u8, g: u8, b: u8) -> u8 using Rec.601:
(r*299 + g*587 + b*114) / 1000.