Replies: 1 comment 1 reply
-
From https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#values
And from https://developer.mozilla.org/en-US/docs/Web/CSS/number
But number in the range [0, 255] can have a fractional component to. So how do we know if a number is in the range [0, 255] or in the range [0, 1] ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was thinking to add a feature for the
rgb()
,rgba()
format: float parsing.For instance: :
rgba(1.0f 0.0f 0.0f 1.0f)
That's perfectly compatible with current format, and pretty useful in some circumstances.
I was thinking to add this by modifying the function
parse_percent_or_255
toparse_percent_or_255_or_float
.If you're ok with this, I will proceed to code it.
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions