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.
no subject
If you want to adjust the transparency, add an alpha channel:
Just replace
alpha
with either a number between 0 and 1, or a percentage:rgba(255 0 0 / .1)
andrgba(255, 0, 0, 10%)
are both .rgba(255 0 0 / .5)
andrgba(255, 0, 0, 50%)
are both .rgba(255 0 0 / 1)
andrgba(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.