I know I already posted about it here earlier, but I'm not sure if there's a better place to post this so, I guess this will do.
RHSL is a JavaScript color picker tool. I made it as a response to
jscolor, another color picker tool that someone else made that I didn't really like using. I'm posting about it now because I just got done with mostly everything that I wanted to do with it.
The biggest problem I had with jscolor is that it is a library and creates an object for every single HTML element it attaches itself to. You have to play around with the objects and their properties instead of the HTML itself, which makes it more heavy than it should be. I thought this was sort of a wasteful use of resources, and decided to make one that didn't use objects at all.
I also tried to make it as simple as possible to use, while also making it lightweight and not having to remove any of its features.
This can be a problem, because there's not really a "public API". Some basic functionality is done using properties (ex. rhslcolor="size: 90 75; padding: 5; align: right;"), but the rest is either done by onchange/oninput (which is fine) or by directly calling the functions themselves. I've adapted the functions so that they work both as an internal and as a public interface. At least, I think so. I'm not sure what counts as an "API" really...
RHSL occupies 26.2KB, which is exactly half of jscolor (52.4KB). Minimizing jscolor makes it occupy 28.4KB, and minimizing RHSL puts it at about 14.1KB, which is still half! Even if probably nobody will end up using it for anything, I'm still happy with what I've been able to achieve. The main goal was actually making the tool itself, after all. That said, it wouldn't surprise me if there weren't some bugs in the code that I haven't found yet, this is me we're talking about after all.
____________________
"The quieter you become, the more you are able to hear." --Ram Dass