Command line tool for composite colour #151
MTxx87
started this conversation in
Show and tell
Replies: 3 comments 2 replies
-
woah!! This is crazy good tool Matteo! Thanks for sharing with the community 🙌🏽 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Welcome, I guess we are from the same year 🤣 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I pushed an update this morning. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone :) !
I am fairly new at CSS battles, but I have become addicted to it quite fast.
In the last few days I have coded a composite-golf (https://github.com/MTxx87/composite-golf) command line tool.
I thought would be good to share it with the community.
It can be used to compute a set of possible overlay colours, given a desired colour and a background, like so:
node . overlay 'rgba(69,60,250,1)' 'rgb(68,159,171)' --alpha=100
This would return a set of overlay colours that result in
rgb(68,159,171)
on backgroundrgba(69,60,250,1)
.The math I used gives good results, but sometime the resulting colour is slightly off compared to what it should be.
If someone wants to check the code and improve the formula, please do so.
Also comments and suggestions are very welcome.
/Matteo
Beta Was this translation helpful? Give feedback.
All reactions