Live data from Hacker News

High Definition CSS Color Guide

developer.chrome.com

11–20 of 58 posts

Re: High Definition CSS Color Guide

#11
post #10

Anyone else irked by the inclusion of `currentColor`? I don't see the relevance.

It simply lists all the ways in which developers specify color in css, and explicitly typing currentColor is a valid option. I use currentColor as an SVG default for instance, when icons should match text color.

Good to know for instance that a bunch of stuff could be deprecated.

Re: High Definition CSS Color Guide

#12
post #3

Surprising to see #rrggbbaa to be <1%, when #rrggbb is the most popular. If you’re already used to hex then why switch to eg rgba when you need alpha? I find it quite useful. Maybe it’s recent and less known.

You answered your own question. It’s less known about, by the time the #rrggbbaa syntax came out people would use rgba() for alpha. Some would also argue the rgba() syntax is more readable when alpha is involved.

If alpha support came out with hex from the beginning then it may be a different story

Re: High Definition CSS Color Guide

#14
post #11
post #10

Anyone else irked by the inclusion of `currentColor`? I don't see the relevance.

It simply lists all the ways in which developers specify color in css, and explicitly typing currentColor is a valid option. I use currentColor as an SVG default for instance, when icons should match text color. Good to know for instance that a bunch of stuff could be deprecated.

I understand what it does and it certainly has its uses but it has little relation to high definition color usage this blog covers.

Can you elaborate on the deprecation part though?

Re: High Definition CSS Color Guide

#15
post #9

I like that the demo slider is directly from one of Bartosk Ciechanowski's always excellent article [1]. He's really a reference in interactive visualization. There's a link to his article on color spaces labeled "Try it for yourself", but I would prefer a direct and clearer textual attribution to him. [1]: https://ciechanow.ski/color-spaces

Really low on the part of the authors to not even mention his name.

Re: High Definition CSS Color Guide

#16
post #9

I like that the demo slider is directly from one of Bartosk Ciechanowski's always excellent article [1]. He's really a reference in interactive visualization. There's a link to his article on color spaces labeled "Try it for yourself", but I would prefer a direct and clearer textual attribution to him. [1]: https://ciechanow.ski/color-spaces

Really low on the part of the authors to not even mention his name.

I mean the source link is right there.

Re: High Definition CSS Color Guide

#18
> The following color spaces offer access to larger gamuts than sRGB. The display-p3 color space offers almost twice as many colors as RGB, while Rec2020 offers almost twice as many as display-p3. That's a lot of colors!

Are there any stats on how many people have devices that support these color spaces? Guessing you're not going to get a lot of brands picking p3 colors until it's widely supported by devices in general usage?

Re: High Definition CSS Color Guide

#19
post #3

Surprising to see #rrggbbaa to be <1%, when #rrggbb is the most popular. If you’re already used to hex then why switch to eg rgba when you need alpha? I find it quite useful. Maybe it’s recent and less known.

I feel it is easier to read/write rgba(125,125,125,0.9) compared to #7d7d7de6.

Indeed the RGB values don’t lend themselves to manual tweaking so #ABCDEF is acceptable, but the alpha value is often set manually and most people are not good at writing numbers in hex compared to decimal.

Re: High Definition CSS Color Guide

#20

> The following color spaces offer access to larger gamuts than sRGB. The display-p3 color space offers almost twice as many colors as RGB, while Rec2020 offers almost twice as many as display-p3. That's a lot of colors! Are there any stats on how many people have devices that support these color spaces? Guessing you're not going to get a lot of brands picking p3 colors until it's widely supported by devices in gener…

p3 has been the default for Apple desktop & mobile displays since 2017 (iPhone 7 era). Other device manufacturers are more likely to have lagged on that but I would imagine a fair number would have added support since.

Also, within CSS & browsers at least, the colours gracefully degrade based on the hardware, so using p3 in a supported browser is not going to look terrible on hardware without p3 support.

Post reply on HN