It appears that values lower than 0 are accepted, which contradicts the documentations (which says that values are in 0-100 range). This results in somewhat unexpected behaviour, where lighten(-15) does somewhat similar thing to darken(15).
There are a few possible solutions I can come up with. The best one would be to clamp input values to 0-100. The rationale is that the scale for lighten and darken is different and depends on the luminosity of the original color.
Example - I have a color that has 70% luminosity. lighten(100) does 70+30 = 100 luminosity. lighten(-100) does 70-30 = 40% which is strange or the stepping value is different, which would also be strange.
So I would vote for removal of this unexpected behaviour.
It appears that values lower than 0 are accepted, which contradicts the documentations (which says that values are in 0-100 range). This results in somewhat unexpected behaviour, where
lighten(-15)
does somewhat similar thing todarken(15)
.There are a few possible solutions I can come up with. The best one would be to clamp input values to 0-100. The rationale is that the scale for lighten and darken is different and depends on the luminosity of the original color.
Example - I have a color that has 70% luminosity.
lighten(100)
does 70+30 = 100 luminosity.lighten(-100)
does 70-30 = 40% which is strange or the stepping value is different, which would also be strange.So I would vote for removal of this unexpected behaviour.