You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey tab, i'm mocking up a parser/converter for the color() function, and was running into an issue of not knowing how to treat the multiplication by a percentage. the most natural way to multiply i'd assume would be by a integer/float:
color(rgb(10, 10, 10) red(* 2))
but the spec says that multiplication happens with a percentage only, so would that be the percentage of the current value? aka the above would translate to:
color(rgb(10, 10, 10) red(* 20%))
aka the 20% is 2 of the red channel 10. or would it be a percentage of the possible full channel, aka a percentage of 255?
i could be way overthinking this. thanks for any help!
The text was updated successfully, but these errors were encountered:
hey tab, i'm mocking up a parser/converter for the
color()
function, and was running into an issue of not knowing how to treat the multiplication by a percentage. the most natural way to multiply i'd assume would be by ainteger/float
:but the spec says that multiplication happens with a
percentage
only, so would that be the percentage of the current value? aka the above would translate to:aka the
20%
is2
of the red channel10
. or would it be a percentage of the possible full channel, aka a percentage of255
?i could be way overthinking this. thanks for any help!
The text was updated successfully, but these errors were encountered: