ceraphiic: (Default)
K. ([personal profile] ceraphiic) wrote in [personal profile] kestrell 2020-10-01 02:49 pm (UTC)

You can write RGB colors in any of these formats as they're all valid:
rgb(red green blue)
rgb(red, green, blue)
rgb(red,green,blue)

If you want to adjust the transparency, add an alpha channel:
rgba(red green blue / alpha)
rgba(red, green, blue, alpha)
rgba(red,green,blue,alpha)

Just replace alpha with either a number between 0 and 1, or a percentage:
rgba(255 0 0 / .1) and rgba(255, 0, 0, 10%) are both    .
rgba(255 0 0 / .5) and rgba(255, 0, 0, 50%) are both    .
rgba(255 0 0 / 1) and rgba(255, 0, 0, 100%) are both    .

I know that's a lot more than you asked for, but there really are many different ways to write RGB colors. Just use whichever you feel most comfortable with, is my advice.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting