Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I delved into the bewildering world of color last Christmas/New Year when developing a new reduce-palette/dither filter for my JS canvas library. The number of different color spaces available, converting between color spaces, calculating color distances - this stuff is mad and frustrating in equal measure!

I built my own solution, then afterwards came across the Color.js repo. I have a strict "no dependencies" rule for my library; discovering Color.js is the closest I've ever come to breaking that rule.



Does ‘no dependencies’ prevent you from copying code in from elsewhere?

If I see small 1 or 2 file libraries I generally just copy them in.


I'm guilty of copying code in from elsewhere. I've made an effort to acknowledge the copying by adding links to the original repos in code comments, which get translated into actual links when I generate the documentation. I also try to acknowledge where I haven't copied code, but the code I've written has been heavily inspired by other people's code.


I do this a lot too, but this is the kind of dependency I’m more okay with. It doesn’t have to integrate with systems so the rug won’t get swept out. It’s low risk and I know I could always copy it if it were to die. I would have no issue depending on it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: