markdownAguiColors
Markdown colours derived from one text colour.
The palette is five colours plus the GFM alert set, and four of the five are backgrounds and rules that only have to read against the surface behind them. Deriving them from text as low-alpha tints means the whole set follows the one colour a caller actually knows -- pass LocalContentColor.current and code blocks stay legible in a dark theme without a second argument.
alert is the sixth, and it is the one that cannot be tinted: GFM's > [!WARNING] blocks are drawn in named accent colours. So the default here picks the set by the luminance of text -- light text means a dark surface behind it -- rather than leaving a dark-theme transcript with light-theme alerts. A caller who knows better passes their own.
The threshold is 0.15 rather than the midpoint, because relative luminance is not perceptual lightness and the two populations are nowhere near it. Measured: Material 3's light-theme onSurface is 0.011 and its onSurfaceVariant 0.062, while its dark-theme onSurface is 0.760, onSurfaceVariant 0.566 and outline 0.281. Everything a light theme uses for text sits below 0.07; everything a dark theme uses sits above 0.28. A midpoint cut would put dimmed light-on-dark text -- outline, or a hand-picked grey like 0xFF9E9E9E at 0.32 -- on the light side and give a near-black surface light-theme alerts.
The default is black, for the reason PlainAguiTextRenderer draws black: this module sits below any design system and has no ambient text colour to read. See MarkdownAguiTextRenderer for what that means when it is used underneath Material 3.