惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
V
Visual Studio Blog
WordPress大学
WordPress大学
博客园 - Franky
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
月光博客
月光博客
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
小众软件
小众软件
Cloudbric
Cloudbric
量子位
N
News and Events Feed by Topic
Vercel News
Vercel News
Security Archives - TechRepublic
Security Archives - TechRepublic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Check Point Blog
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
T
Tenable Blog
S
Secure Thoughts
Know Your Adversary
Know Your Adversary
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
Stack Overflow Blog
Stack Overflow Blog
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
T
Troy Hunt's Blog
GbyAI
GbyAI
Attack and Defense Labs
Attack and Defense Labs
C
Cybersecurity and Infrastructure Security Agency CISA
Y
Y Combinator Blog
美团技术团队
爱范儿
爱范儿
Martin Fowler
Martin Fowler
Last Week in AI
Last Week in AI
P
Privacy International News Feed
T
The Blog of Author Tim Ferriss
F
Full Disclosure

alexwlchan

Preventing line breaks in <code> elements Fixing a bug with byte order marks A Git hook to prevent committing directly to main Describing all my photos I don’t want to repeat repeat myself Rebuilding the computer room What can wonky APIs tell us about the web? Using the Screen Capture API to record a browser window Using Pytester to test my Playwright fixtures Rendering a chat thread in CSS and JavaScript Waiting for website changes in the browser Watching for file changes on macOS Using Playwright to test my static sites Building a basic cache with SQLite HTTP GET requests with the Python standard library Auditing my local Python packages Quietly quantum-resistant blogging Creating a personalised bin calendar Monki Gras 2026 “Prepping Craft” The selfish case for public libraries Dreaming of a ten-year computer The bare minimum for syncing Git repos Creating Caddyfiles with Cog Swapping gems for tiles Parody posters for made-up movies The Good, the Bad, and the Gutters Using perceptual distance to create better headers The passwords I actually memorise Where I store my multi-factor recovery codes Quick-and-dirty print debugging in Go My favourite books from 2025 Drawing Truchet tiles in SVG Adding a README to S3 buckets with Terraform The palm tree that led to Palmyra
Gumdrop, a silly app for messing with my webcam
2026-03-05 · via alexwlchan

During the COVID lockdowns, I spent long evenings at home on my own, and I amused myself by dressing up in extravagant and glamorous clothing. One dark night, I realised I could use my home working setup to have some fun, with just a webcam and a monitor.

I turned off every light in my office, cranked up my monitor to max brightness, then I changed the colour on the screen to turn my room red or green or pink. Despite the terrible image quality, I enjoyed looking at myself in the webcam as my outfits took on a vivid new hue.

Here are three pictures with my current office lit up in different colours, each with a distinct vibe:

A photo of me in a red room. Most of the background has faded to dark red, and my face is glowing red in the middle of the frame.A photo of me in a green room. The background is more visible, a shade of clover green, while my face looks positively radioactive.A photo of me in a blue room. Everything is dark and moody, like in a sci-fi film.

For a while I was using Keynote to change my screen colour, and Photo Booth to use the webcam. It worked, but juggling two apps was clunky, and a bunch of the screen was taken up with toolbars or UI that diluted the colour.

To make it easier, I built a tiny web app that helps me take these silly pictures. It’s mostly a solid colour background, with a small preview from the webcam, and buttons to take a picture or change the background colour. It’s a fun little toy, and it’s lived on my desktop ever since.

Here’s a screenshot:

Screenshot of a web page which is mostly hot pink, with two small inline pictures of me in my office. One picture is very pink (the current view) and the other is less pink (a photo taken a few seconds prior). Below the current view are three buttons to allow camera permissions, take a picture, and change the colour.

If you want to play with it yourself, turn out the lights, crank up the screen brightness, and visit alexwlchan.net/fun-stuff/gumdrop.html. All the camera processing runs locally, so the webcam feed is completely private – your pictures are never sent to me or my server.

The picture quality on my webcam is atrocious, even more so in a poorly-lit room, but that’s all part of the fun. One thing I discovered is that I prefer this with my desktop webcam rather than my iPhone – the iPhone is a better camera, but it does more aggressive colour correction. That makes the pictures less goofy, which defeats the purpose!

I’m not going to explain how the code works – most of it comes from an MDN tutorial which explains how to use a webcam from an HTML page, so I’d recommend reading that.

I don’t play dress up as much as I used to, but on occasion I’ll still break it out and amuse myself by seeing what I look like in deep blue, or vivid green, or hot pink. It’s also how I took one of my favourite pictures of myself, a witchy vibe I’d love to capture more often:

A picture of me smiling at the camera from inside my office. The room is lit up in a moody green, I have dark lipstick and a dark dress, and some cat ears vaguely visible. I am absolutely beaming with joy.

Computers can be used for serious work, but they can do silly stuff as well.