css-colorguard
css-colorguard copied to clipboard
Alpha transparency
Just leaving this as a note to get back to when I (or anyone else, PR welcome) have time.
https://github.com/markusn/color-diff/issues/8#issuecomment-143502751
There should be an option to ignore alpha so #000 and rgba(0, 0, 0, 0.3) are considered different.
I would expect this to be the default behavior.
@captbaritone do you have a suggestion on how to implement it safely?
#000 and rgba(0,0,0,0.3) may be exactly the same, or very different depending on the color of the element behind it.
Can we just multiply diffAmount by the difference between the alpha сhannel values of colors?
@Sigiller @kbytin @XOP do you want to send PR for it?
not in the nearest future, sorry