Meg Ann
Meg Ann

Reputation: 323

Google Chrome Devtool RGBA Issue

I've been dealing with the same issue last couple of months. I've googled the same issue but i guess no-one has address this issue before.

previously when i change the hex color transparency, for example #FFFFFF, the Chrome devtools was giving me the option of RGBA version like RGBA(255,255,255,10%) but now when i do the same thing the result is for 10% white color transparency ise rgb(255 255 255 / 10%)

As you can see the RGBA is now gone and the devtool onşy show the strange version of rgb type.

rgba problem

Does anyone issued the same problem before? And do you know how to fix it?

Upvotes: 14

Views: 1999

Answers (2)

Abouasy
Abouasy

Reputation: 896

open color picker + shift

open chrome developer >> open color picker + shift

Upvotes: 2

Mathias Bynens
Mathias Bynens

Reputation: 149734

This was an intentional change in DevTools. The comma-based syntax is what the spec now calls “legacy syntax”.

See https://twitter.com/mathias/status/1253242715304857601:

💡 In source code, stop using the old rgb()/hsl() CSS color syntax with commas.

Get used to the modern comma-free CSS color syntax, supported in all modern browsers.

Why? Upcoming new features such as lab(), lch(), and color() use the same syntax (and don’t work with commas).

Spec: https://drafts.csswg.org/css-color/#rgb-functions

[…] for legacy reasons, an rgba() function also exists, with an identical grammar and behavior to rgb().

Upvotes: 5

Related Questions