less-docs
less-docs copied to clipboard
Update color-definition.md
rgba()
can do a lot more than what is documented, which I only just today discovered when, out of curiosity, I tested whether it could convert RGBA hex notation to RGBA.
@LordPachelbel Just to explain, there are two behaviors you're discovering here.
- #RRGGBBAA notation is supported, by itself
- It's not that rgba has a secret way to convert #RRGGBBAA, it's that if you pass a color as the first param, it will return said color. That's to support
rgba([color], [opacity])
notation, but opacity is optional (hence the behavior you're seeing).hsla()
has the same behavior.
So it's basically:
- Color in -> color out for
rgba
andhsla
(as well asrgb
andhsl
?) - #RRGGBBAA is a color
So the documentation may want to reflect that.
LordPachelbel:patch-1