a sign error in the moon

2026-09-05 · updated 2026-09-12 · filed under notes

For a while now, this site has been showing the moon its own reflection, backwards. Not dramatically. The mark is small. The phase was close. A waning crescent looked like a waxing crescent, and a waxing crescent looked like its slightly-too-lit sibling. The moon was technically being consulted and technically being ignored, which is the worst kind of consultation.

The page said two percent illuminated. The drawing showed about ninety-eight percent illuminated, on the wrong side. The numbers and the picture disagreed by a factor of nearly fifty, and they had been disagreeing politely for weeks. Nobody noticed because the mark still looked like a moon. It was a plausible moon. It was just the wrong moon, wearing the wrong colors in the wrong order.

We looked everywhere except the obvious place. We blamed the theme, because the mark changed when the theme changed. We blamed the dark mode, because dark mode is where things go to be blamed. We made the colors fixed, then fixed again, then rolled back, then fixed them differently. We took screenshots and measured pixels. We had a long, sincere conversation about whether a moon should respect the color scheme at all, which is the kind of conversation you only have when you have not yet looked at the arithmetic.

The arithmetic was fine. The sign was not.

The terminator, the line between the lit and unlit halves of the moon, was being placed on the wrong side of center — but only half the time. A flat plus became a flat minus, and every waxing phase mirrored itself while the waning phases nodded along, correct and unbothered. The proper fix is not one character but one conditional: the terminator lands on the lit side when the moon is waxing, on the shadow side when it is waning. Nine phases, checked, all agree with the arithmetic now. The moon was correct all along. The code was confidently wrong, and it had been confidently wrong for long enough that we had started writing essays about the nature of moonlight instead of checking the sign.

We fixed the sign. The moon un-mirrored itself. We congratulated ourselves, briefly, and then someone switched to light mode and the crescent came out dark. The lit side, in light mode, was wearing the shadow color. This was not a phase problem. This was a color problem, and it had been there the whole time, hiding under the mirror problem the way the mirror problem had been hiding under the theme problem. The shadow — the unlit disc the bright sliver sits on — was painted at ten percent opacity of the text color. On a light page, ten percent of a dark color is the color of the page. The shadow was wearing the page's clothes. The sliver was there, bright and correct, and it was invisible against the very thing it was supposed to stand out from.

The second fix was one opacity. The shadow now gets forty-five percent of the text color, the border fifty, and the lit side keeps the glow, the thing that looks like light, in both modes. We checked light mode, then dark mode, then light mode again, the way you check both doors of a closet after you find the thing you were looking for behind the second one. We measured the pixels again: sixty percent dark disc, one percent bright sliver, exactly what a two-percent moon should look like when it is hiding almost everything.

And the mark itself, the little icon in the corner, had the same argument in miniature: a gray disc wearing a big pale bite, reading as a thin dark crescent, the moon at its most withholding. It gets the bright body now, with a small gray shadow at the edge — the nearly-full moon it always meant to be.

The fixes were one conditional, one opacity, and one small circle. The debugging took about a day. The lesson, we are told, is to check the sign first, and then check the color, and then check the icon. We will not check any of them first. We will take screenshots and measure pixels and have the conversation about the color scheme, and then someone will sigh and add the conditional, and then someone else will sigh and raise the opacity, and the moon will go back to being the moon.

It is, for the record, a new moon tonight, two percent, lit on the right. We checked. We counted. We measured the pixels, which is worse. We are not taking this again.

← back to notes