CHENGJIAHEGOXIS, on v0.1.4124 (tweet 2121468612238266666), with three
dark-theme screenshots of Settings > General, one each with Default,
Graphite and a custom black picked: 「这三个颜色……都显示是一样的」,
「尤其是黑色始终一直是灰色」. Their screenshots show the same page in all
three: ground (25,25,27), card (32,32,34).
Why:
- v0.1.4124 tints the grounds with the pick's hue only (base + k*(c -
mean(c))), lightness kept. Black and Graphite have no hue, so they
changed nothing. Default draws no look at all (magpie's own).
- accentOn lifts a dark pick toward white only until it reads at 4.5:1,
so black's dark ink came out #8a8a8a, next to Graphite's #89898f.
What changes (appearance.go):
- ground(): on the dark theme, a pick darker than the theme's background
darkens every dark ground by as much (depth()). Black draws a black page
(#000003), with cards, pills, lines, menus and the tray panel the same
steps above it as in app.css (card #08080c, line #18181e). Graphite,
and any colour as light as the ground, draw as before.
- lifted(): black's ink starts most of the way to white, so it is a light
mono ink (#e0e0e0, dark text on its buttons), not Graphite's grey. On
the light theme black is #000000, as before. The sibling, white on the
light theme, now gets a dark ink instead of a mid grey.
- The light theme's grounds keep their lightness: a white pick would melt
its white cards into the page.
- app.css: a swatch's edge and the chosen ring take a little of the text's
ink, so the black swatch stays seen on the black page it draws.
- Default stays magpie's own look (grey grounds, indigo accent) for every
user. Not changed here.
Tests:
- TestBlackIsBlack: black's dark page is black and each ground keeps its
step; Graphite moves nothing; black's ink is light in dark (>= 1.8:1
from Graphite's) and #000000 in light; white's light ink is dark; text
reads >= 7:1 on black's grounds.
- appearance-look.test.cjs: "Default, Graphite and black are three looks",
light and dark, both engines: three different --accent values; Graphite
keeps the grey page; in dark, black's page is black, Settings' list sits
on black's card a step above it, its ink is light; in light, black is
#000000 ink.
- TestLookFixture's fixture gains #000000 and #52525b.
Run on mote (mote was unreachable for ~20 minutes; the red check ran on
mica), at this commit rebased on origin/main fc896a9f6:
- gofmt -l internal/gui: clean. go vet -tags nogui ./internal/gui, the
same with GOOS=linux, and GOOS=windows go vet ./internal/gui: ok
(before the rebase onto fc896a9f6, which touched nothing in gui).
- go test -tags nogui -timeout 45m ./internal/gui: ok (95s, before the
rebase); at the rebased head go test -run
'TestAccent|TestLook|TestTint|TestWallpaper|TestBlack|Budget': ok.
- node --test, both engines (the files run every language at 420 and
1000px where they have that matrix): appearance-look 44/44, i18n-keys
4/4 at the rebased head; checkbox-look 8/8, seg-contrast 14/14,
settings-general 20/20, settings-sections 10/10, input-look 20/20
before the rebase. api-key-theme 0/6 (#6444) and omarchy 8/14 (#6027)
are red with the same cases on a copy of origin/main fc896a9f6.
- Broken by hand: with origin/main's appearance.go and its fixture
regenerated for #000000 and #52525b, the new GUI case is red in dark in
both engines ("black's page is black, not rgb(26, 26, 30)"); light
passes there, as black was already #000000 ink on the light theme.
- Screenshots, both engines, Settings > General zh at 1200, Default /
Graphite / black, light and dark, before (origin/main's lookCSS) and
after (before shots on mica, after on mote): dark black's page goes (26,26,30) -> (0,0,3), card (35,35,39)
-> (8,8,12); Default and Graphite unchanged; black's ring still shows.
Not tried:
- the real macOS app, WebView2 and WebKitGTK;
- the full Go and GUI suites.