Telling Technology · Learning in public
All episodes
EP.143 - ONE COLOUR
A Claude Code workflow · one question, one static page, one link

I asked for the electricity price. My AI gave me a traffic light

I did not want a chart of Nordic spot prices. I wanted one answer: should I run the dishwasher now? So Claude Code built a page that is one big light, green, amber or red, with the price in small print underneath. One HTML file, no app, no ads, no login. It went out as a link to my phone the same evening.

A single traffic light glowing green above the dark roof of a house at dusk, the other two lamps off
● 1 HTML file · 3 colours · refreshes every 5 min · price area SE4
what does a decision look like, instead of a dashboard?
01 The ask

“Should I run the dishwasher now?”

Electricity in Sweden has a spot price that changes through the day, and in price area SE4, the south, it swings a lot in a single day. Most price apps answer a different question: here is a chart, here are 96 quarter-hours, you work it out. I only want to know one thing, standing in the kitchen with the dishwasher door open. So I asked Claude Code for a page that answers that, for my price area, with no app, no ads and no chart I have to read. It pulls the day’s prices from the free elprisetjustnu.se API, which needs no key, and loads tomorrow’s too once they are out, at about 13:00. The evening it went live, 6 November at 17:41, the real prices put it at red.

reconstructed, not quoted
> make me a page for the electricity price in SE4. I just want to know if it’s cheap right now. For my phone. No chart to decode.
Built one static page. Right now: red, 4.26 kr/kWh, “Dyrt nu” (expensive now). Advice under the light: wait if you can, cheap again at 03:00. Best two hours left today: 22:00–00:00.
A mockup of the page on a phone at 17:41: a big coral-red circle with a raised-hand emoji, the words Dyrt nu, 4,26 kr/kWh just nu, and the advice to wait until 03:00
17:41 · red · 4.26 kr/kWh
the page the evening it went live (mockup from the real prices)
02 The design choice

A decision, not a dashboard

The whole top of the page is one huge light. Three states, each with a soft tint behind it: green “Billigt nu” (cheap now) with a thumbs-up, amber “Mellanpris” (middle price), red “Dyrt nu” (expensive now) with a raised hand. The number is secondary, in normal type under the word. Under that, one line of advice: run it now, or wait until a given time. Only below the light come the details: the next 16 hours as small coloured bars, and the cheapest two-hour window today and tomorrow for the dishwasher, washer and dryer. The build is just as small. One static HTML file, mobile-first in a 560 px column, padded for the phone’s notch with safe-area insets, refreshing itself every five minutes. The theme follows the phone’s light or dark setting, and if I flip the toggle it remembers my choice.

example, not a real exchange
> the number is too big. Make the colour the answer and the price the footnote.
Done. The light is 120 px and the word is the headline; the price is body text. Three states, three tints. Advice line under it. Hours and best window moved below. Theme follows the phone, toggle saved in localStorage.
Three phone screens side by side showing the same page in its three states: green Billigt nu, amber Mellanpris and red Dyrt nu, each with a soft matching background tint
green · amber · red
the three answers the page can give (mockup)
03 The honest part

Green means cheap for today, not cheap

The colours are not fixed prices. Green is the cheapest third of the day’s hours, red is the most expensive third, amber is the rest. That is the right rule for “when today should I run it”, and it is a strange rule across midnight, because tomorrow gets its own thirds. Recomputed from the real prices for the evening it went live, the bars give 23:00 today at 2.98 kr, amber, and right after it 00:00 tomorrow at 3.01 kr, red. Two hours earlier, 21:00 at 3.28 kr was amber too. Nearly the same price, two colours, because tomorrow is a cheaper day overall. There is a second quirk in time: Nordic prices now come in 15-minute slots. The light uses the current quarter-hour, the bars average the four quarters into an hour, so the light and the bar for “now” can disagree by a few öre.

reconstructed, not quoted
> why is midnight red when 23:00 is amber? It’s 3 öre more.
Each day is split into thirds on its own prices. Tomorrow’s red starts at 3.01 kr; today’s starts at 3.66 kr. So 3.01 is red tomorrow and 3.28 is amber today. That is by design: it answers “cheap for this day”. I can switch to fixed thresholds if you want “cheap, full stop”.
A strip of 16 hourly bars from 17:00 to 08:00: tall red bars in the evening, amber bars at 21 to 23, then a red bar at midnight that is barely taller than the amber one before it, with a note that tomorrow has its own thirds
2.98 kr amber → 3.01 kr red
midnight resets the thirds (mockup from the real prices)
⚠️

What the colour does not know

The light is the spot price only. The page says so in its footer: no grid fee, no energy tax. Those make up a large part of the bill and they barely move by the hour, so the real gap between a green hour and a red hour is smaller than the colours suggest. The page also only knows what the free API knows: if elprisetjustnu.se is down, the light says “Kunde inte hämta priset” (could not fetch the price) and nothing else. And until tomorrow’s prices come out around 13:00, the best-window card for tomorrow just says they are coming. I kept all three. A light that admits what it cannot see is better than one that guesses.

04 The pieces

Light and dark, the link, the best window, the same shape

Each picture is a mockup of a real part of the page or the publish step. The prices are the real SE4 prices from 6 and 7 November 2026. The pictures leave the town name out. The live page is for Lomma. Tap any image to enlarge it.

THE TEST FOR A PERSONAL DASHBOARD

The best dashboard answers one question

The use is meant to take one second: open it from the home screen, look, close it. Green: press start. Red: set the delay timer to the time it suggests. The bars and the best window are there, one scroll down, for the day I want them. That is the pattern I keep coming back to: a personal question becomes a bookmarkable URL. My shoe-price watcher has the same shape with different data, and both went from question to link without any hosting setup, because one publish command pushes a single file to a public page. The best dashboard answers one question. Everything else is a second page.

A dark kitchen at night, a dishwasher door half open, a phone leaning against the tiles showing one large green circle that lights the counter
elpris page · published 2026-11-06 17:41 · price area SE4 · data: elprisetjustnu.se · refresh every 5 min
06 Steal this

Steal the one-colour price page

It is one HTML file with no build step and no key. The price area is one line, AREA='SE4'. The pattern fits any “should I do it now?” question: fetch the day’s numbers, split them into thirds, show one colour and one line of advice. The code was not published when this was written.

skill the page: one light, three states, advice line, 16-hour strip, best two-hour window cmd the rule: cheapest third green, dearest third red, the rest amber, per day template the shell: 560 px column, safe-area insets, theme follows the phone, toggle in localStorage assets the data: elprisetjustnu.se public API, quarter-hours averaged into hours
the shape fetch /api/v1/prices/YYYY/MM-DD_SE4.json (today + tomorrow) → average 15-min slots per hour → thirds per day → colour the current slot → next green hour + cheapest 2 h window → refresh every 5 min