A cartoon skull with a hotpink hat on.
atom@argyleink
notecss

Would use:
CSS relative alpha.

button {
  border-color: alpha(from hotpink / calc(alpha * .25));
}

9 comments #

61likes

and 40 others

7reposts
  • netop://ウィビ
  • Paul Kinlan
  • Tab Atkins-Bittner
  • Rolle Laukkarinen
  • David Lapointe Gilbert

and 2 others

Join the conversation on

@argyleink Idk why but I can’t seem to open the csswg link. Just me ?? Looks interesting but why isn’t this the same as color-mix with transparent
Ryan KuruppuRyan Kuruppu
@raiiii_kun @argyleink Could you give an example?
一丝一丝
@yisibl @argyleink color-mix(in srgb, #000, transparent 80%) this I would assume give a similar or same result ?
Ryan KuruppuRyan Kuruppu
@raiiii_kun @argyleink `alpha(from #000 / 80%)` is equivalent to `color-mix(in sRGB, #000 80%, transparent)` You can try it in Chrome Canary.
一丝一丝
@yisibl @argyleink Right. So basically it’s syntax sugar for that ? If so, cool. I assume it auto detects the color space based on what we pass as the color ?
Ryan KuruppuRyan Kuruppu
@raiiii_kun @argyleink Yeah
一丝一丝
@raiiii_kun @argyleink https://t.co/nvz9LfkXA9
一丝一丝
@yisibl @argyleink Love this. Thanks @yisibl. Appreciate it✨
Ryan KuruppuRyan Kuruppu
@yisibl @raiiii_kun mmm sugar
Adam ArgyleAdam Argyle