Estas fotos son de la primera vez que me subí en un Talgo Avril. Un avlo desde Santiago hasta Coruña que convirtió la media hora de trayecto en eterna.
Lo de que hace ruido no es una sugestión, me lo pareció en ese momento antes de ni siquiera saber de qué iba ese tren.
Las imágenes:
1. Nada más subir la pantalla no mostraba las teselas del mapa
2. Detalle del horrible diseño. Los colores (#000, #F00, #0F0 y #00F) no ayudan. Tampoco lo hacen las teselas genéricas de OSM, buenas para otras cosas, feas aquí, ni el texto que está todo el rato deslizándose por debajo
3. Recuerda, en caso de emergencia sigue las instrucciones de seguridad
4. Más texto deslizándose horrible
@xero nice code!
I see you're actually calculating things rather than rendering them with a browser (see nf.color2hex in nofus.js, which I use mostly for userscripts). I assume your way is significantly faster.
Given your goal of minification, do you want red to gain a byte with #f00? I see transparent maps to rgba(0,0,0,0) but it could be #0000.
Idea for you: a configurable maximum distance (default=0) per color channel to permit rounding, e.g. 4 means #ff362f becomes #f33 since 0x33 is within 4 of both 0x36 and 0x2f.
(I suppose it'd be better to use the sum of differences or some more sophisticated combination, perhaps keyed to a percent, but that's a dangerous rabbithole of researching color perception (e g. OKLCH). Determining a sane thresholding system and ideal values won't be easy.)
So from the rough example math in the previous, with #f00, the L cone is receiving 3.5 times more than M.
With the grey, L receives 1.33 times more than M (L cones are more populous).
With the grey, the ganglion cells are switched to where the signal is sent to light/dark.
With the red #f00, the L gets 26% more luminance than the grey, and also L is not really competing with M as here, L is getting 71% more than M.
Point: there are clearly a number of places where the physiology favors a vibrant red vs a grey of same luminance.
Okay, so in the normal eye, there are more L cones than any other. Stim the L cones only, with the L cones making up the majority of the luminance signal (with L cone peak being a greenish yellow).
And meanwhile the S cones are not contributors to the luminance channel (any luminance from the display blue primary is due to the stim of the M and L cones).
The sRGB red primary creates about 21% luminance.
The first image is a neutral grey of 21% luminance #868686 against #f00 .(equal Ys, 0 C vs red 104 C)
The second image is #f00 v #860000 (Lc25)
The third is #009494 vs #f00
(equal Ys — 33 C v 104 C)
The 4th is #d11 v #06f
(equal Ys & equal chroma)
Note: Ys is "screen luminance"
----
Some very rough calcs:
#f00 mostly stims L cone to Ys=21.3%
#868686, the values are
R Ys= 4.5
G Ys=15.3
B Ys= 1.5
So #f00
L 16.6%
M 4.7%
L gets 3.5 x more than M
#868686
R
L cone 3.5%
M gets 1.0%,
G & B
Remaining 16.8%:
L 9.7%
M 8.9%
=
L for the Grey 13.2%
M for the Grey 9.9%
L 1.33 more than M
Huh! Did you know, it's possible to style highlighted text fragments?
For example:
example.com#:~:text=hello
The word "hello" can be highlighted with:
`::target-text{ background:#f00; }`

Text fragments link directly to specific text in a web page, without requiring the page author to add an ID. They use a special syntax in the URL fragment. This feature lets you create deep links to content that you don't control and may not have IDs associated. It also makes sharing links more useful by directly pointing others to specific words. Browsers may differ in how they draw attention to the linked text—usually, the text is scrolled into view and highlighted with color.