Kartik Agaram on Nostr: Automatically selecting colors with sufficient contrast. Here's a test build of my ...
Automatically selecting colors with sufficient contrast.
Here's a test build of my hypertext browser where every "page load" picks a random background. The foreground and link colors adapt to preserve a minimum contrast (WCAG AAA level).
Colors in my markup language are no longer rgb.
Background colors are strings of the form 'hue:intensity:lightness', e.g. 'red:5:4'
Foreground colors can contain just 'hue' or 'hue:intensity'. Missing fields get filled in to maintain contrast.
{
"id":"40353910f33ec801788f7ec74251c2e3ad515edf4b49cd2389a8a1f0f35d3692",
"pubkey":"ef8454368bb2b2304988e7863afe619bfdb3512c701f4b2e6377ecd29c8091cd",
"created_at":1743833451,
"kind":1,
"tags": [
[
"imeta",
"url https://assets.merveilles.town/media_attachments/files/114/283/862/376/952/313/original/d9f2099e429e98de.mp4",
"m video/mp4",
"dim 800x600",
"blurhash U4Szl655V@tR0_9sNsoJbtjrS0WU^l-VWTS1"
],
[
"proxy",
"https://merveilles.town/users/akkartik/statuses/114283869059567996",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.mostr.pub"
]
],
"content":"Automatically selecting colors with sufficient contrast.\n\nHere's a test build of my hypertext browser where every \"page load\" picks a random background. The foreground and link colors adapt to preserve a minimum contrast (WCAG AAA level).\n\nColors in my markup language are no longer rgb.\n\nBackground colors are strings of the form 'hue:intensity:lightness', e.g. 'red:5:4'\n\nForeground colors can contain just 'hue' or 'hue:intensity'. Missing fields get filled in to maintain contrast.\n\nhttps://assets.merveilles.town/media_attachments/files/114/283/862/376/952/313/original/d9f2099e429e98de.mp4",
"sig":"fa1b010d95a6b75774ef35aeaa991b4e6a59b3c675fc58510c62dc5ecd944244693607df86004d1ac16c79a2a2088b02ed83f573b7f3bfe43b701cc932bb3711"
}