My experience here is that the OSes are the problem. They provide an API that looks like "please display the following (r, g, b) tuple". Unfortunately, that isn't enough information to accurately display a color. To turn an (r, g, b) tuple into a color, you have to assign it a colorspace, and that's where everything is broken.
For example, when I last punished myself by using a better-than-sRGB monitor, I learned that browsers will properly color correct images that have a colorspace tag, but they do not do it to CSS. So if you have an image with color #abcdef and then you set a CSS color to #abcdef, they will be different colors!
Applications that want to properly display color have to hack around things. They need to ask the OS for the display's colorspace, then they have to figure out the image's color space, then compute a transformation that will yield an (r, g, b) tuple that when transformed by the OS (using the monitor's profile) will display the right color. This is horrifying but does work; so at least things like Photoshop can typically show you the right color.
It would be nice if we could use more than 24 bits for color and just stored everything as a CIExyz color. People have known that that is the right solution for decades but nothing has happened, so I'm not holding my breath. Realistically, I think we have to agree on a new set of primaries and gamma, and start assuming that a (r, g, b) tuple is in that colorspace. I guess this is what DCI-P3 is. It is the same problem all over again, but might at least get people better colors soon.