Live data from Hacker News

Too Much Color

keithcirkel.co.uk

61–70 of 71 posts

Re: Too Much Color

#61
post #59
post #55

Earlier quoted context omitted.

It depends on your use case. Storing WGS84 coordinates as 32-bit floats can incur on errors of several meters. It might be good for your fitness tracking application, but not for serious GIS usage. Case in point: many years ago I was working on some software to generate 3D models from drone pictures. The first step of the pipeline was to convert from WGS84 to ECEF ( https://en.wikipedia.org/wiki/Earth-centered,_Earth…

Isn't that more of using a float to represent the number? Would be akin to trying to represent .5. Which, if your goal is to represent decimals, you are best off not using floats. Granted, just storing it as a 32 bit integer is probably difficult for most uses. BCD just isn't common for most programmers. (Or fixed point, in general.)

If your goal is just to store the coordinates in a database, sure, use fixed point or whatever.

But any kind of calculation will involve a great deal of trigonometry, square roots, and the like. It is just easier to use floating point. Examples:

https://en.wikipedia.org/wiki/Geographic_coordinate_conversi...

https://en.wikipedia.org/wiki/Vincenty%27s_formulae

https://gist.github.com/govert/1b373696c9a27ff4c72a

Re: Too Much Color

#62
post #28

He’s talking about minifying CSS colors and I’m not sure if it is what I think it is. Do CSS minifier really adjust the colors in the CSS files to get better compression rates or to reduce the number of rules in the CSS?

It depends on the minifier (SVG optimizers do this too), but yes, they may reduce the precision of colors. I checked and esbuild will turn lab() into a hex color if possible.

Re: Too Much Color

#63
post #53

I've always assumed minifiers were a kind of lossless compression. I guess this optimization makes it lossy? Even if we can't tell the difference between oklch(0.659432 0.304219 234.75238) and oklch(.659 .304 234.752) they're still different colors.

Tge whole contexr of the article is answering your question: a "different color" is a specification laden structure and the answer is no according to spec.

Re: Too Much Color

#64

Earlier quoted context omitted.

.0037. IIRC it is possible to get a better score by looking around the screen, your peripheral vision might be somehow more sensitive. I can see what they mean about .02 though. If I weren’t specifically looking for difference that’s where the colors become less noticeable.

Looking around if you have an LCD also helps compensate for colors shifting off-axis.

What youre doing is seeing changes limited to one of the R, G, B so instwad of judging integral xolors, your doing 3 different. The article explains how errors propagate, and those RGB pixels will all shift errors because of matetial science.

Re: Too Much Color

#65
post #3

> The magic number to remember is the "Just Noticeable Difference" (JND). For dE00, JND is around 2.0. Below that, people struggle to tell two colours apart. Below 1.0, basically no one can. Except for a tetrachromat. Specifically, a strong tetrachromat that has both four colour channels in the brain and a different frequency on the fourth cone. Who are, admittedly, hella rare. Apparently there are less than a few do…

> admittedly, hella rare. Apparently there are less than a few dozen confirmed world-wide What's actually hella rare is tests for tetrachromacy. Given the total number of people who have ever taken such a test, I think it's reasonable to assume there are significantly more than a few dozen actual tetrachromats out there.

It's theoretically related to color blindness, so you'd expect it to be as common. But the problem is even if your eye has the extra primary, your brain may not have developed the ability to "see" it. They had to test quite a few people with the proper genetic background before they finally found one.

Re: Too Much Color

#66
post #3

> The magic number to remember is the "Just Noticeable Difference" (JND). For dE00, JND is around 2.0. Below that, people struggle to tell two colours apart. Below 1.0, basically no one can. Except for a tetrachromat. Specifically, a strong tetrachromat that has both four colour channels in the brain and a different frequency on the fourth cone. Who are, admittedly, hella rare. Apparently there are less than a few do…

Thanks to a genetic variation I have a variation that may be similarly useful. I aced the JND test without contacts and with adaptive white balance enabled, and I already know from playing I Love Hue that my fidelity and velocity improves when I have stereo vision. It turns out that my left and right eyes are skewed apart along a magenta/cyan axis. Left is more cyan, right is more magenta. It’s not as strong an effec…

I have somewhat similar left/right near/far difference but because I am older, my focusable range is limited and I use contacts with what’s called monovision - one eye is for close vision and one eye is for far vision. Because my eyes are naturally almost the same (one contact is 0 and the other +0.25) I don’t need contacts for driving - I have natural monovision. But the gap in clear vision is at my computer monitor distance, so I have computer glasses that reverse the monovision.

Re: Too Much Color

#68
post #65

Earlier quoted context omitted.

> admittedly, hella rare. Apparently there are less than a few dozen confirmed world-wide What's actually hella rare is tests for tetrachromacy. Given the total number of people who have ever taken such a test, I think it's reasonable to assume there are significantly more than a few dozen actual tetrachromats out there.

It's theoretically related to color blindness, so you'd expect it to be as common. But the problem is even if your eye has the extra primary, your brain may not have developed the ability to "see" it. They had to test quite a few people with the proper genetic background before they finally found one.

That's fair but even colour blindness is mostly undiagnosed in practice - even with the comparatively high prevalence & awareness, actual figures for colour blindness are still grounded in speculative extrapolation.

I think it fundamentally comes down to whether your sense anomaly represents a significant disability. Colour blindness is a disability, but not one that's significant for the vast majority of people who suffer from it - I've worked with multiple colour blind graphic designers & they were good at their job. There's very little impetus to even seek diagnosis - if they weren't working in a colour-focused industry I suspect they may not have ever realised they had a disability at all.

Tetrachromacy then is an even harder case because it's not a disability at all. The impetus to seek "diagnosis" is zero. Also, even though as you mention there's technically multiple ways of detecting the various factors that need to coexist in tetrachromacy (i.e. (1) sensory testing, (2) physical presence of extra primaries, (3) neurological processing pathways), the latter two are either not directly detectable or never directly tested for - even in speculative cases of people having a 4th primary, the number of primaries present is generally hypothesised via some other avenue like testing for anomalous trichromacy. Ultimately we're heavily relying on direct sensory testing which is almost nonexistent in the general population. There's no way to accurately speculate on how prevalent it might be.

Re: Too Much Color

#69
post #33

Eight bits of precision should be enough for everybody. (It both is and isn't, depending on the use case, but I'm pretty sure nobody's design needs to make a difference between #123456 and #123457.)

LG just introduced a new 13 bit color TV... https://youtu.be/82InNlCqxlU it makes a difference in dark colors apparently. I can often still see banding on high end monitors.

Do I need that kind of precision in my CSS? Probably not. But for gradients, it seems helpful.

Re: Too Much Color

#70
post #61
post #59

Earlier quoted context omitted.

Isn't that more of using a float to represent the number? Would be akin to trying to represent .5. Which, if your goal is to represent decimals, you are best off not using floats. Granted, just storing it as a 32 bit integer is probably difficult for most uses. BCD just isn't common for most programmers. (Or fixed point, in general.)

If your goal is just to store the coordinates in a database, sure, use fixed point or whatever. But any kind of calculation will involve a great deal of trigonometry, square roots, and the like. It is just easier to use floating point. Examples: https://en.wikipedia.org/wiki/Geographic_coordinate_conversi... https://en.wikipedia.org/wiki/Vincenty%27s_formulae https://gist.github.com/govert/1b373696c9a27ff4c72a

You should be able to do the calculations in fixed point, easily enough? Indeed, it used to be that most embedded systems would use fixed point due to lack of float hardware.

I would actually think fixed point would be beneficial for its accuracy being a bit more controlled than floating point is. Yes, you lose the range of floating point. But I just don't see how that is relevant for numbers that are constrained to +/- 180 by definition.

That all said, I cannot and do not argue against that it is faster to get going with basic float/doubles, due to how commonly those are supported in base libraries.

Post reply on HN