Webkit CSS to control the box around the color in an input[type=color]?

WebKit has special CSS selectors you can use to customize form controls but they aren’t official. An update to WebKit in the future will probably break it. Please don’t use it for production!! But feel free to play with it for personal projects 🙂 Method 1 Uses webkit-specific selectors to mostly hide the non-colored part … Read more

JavaScript eyedropper (tell color of pixel under mouse cursor)

It’s not possible with JavaScript as it goes against cross-domain security. It would be very bad if you knew what pixels made up the image, http://some-other-host/yourPassword.png. You can only tell the color of the pixel under the mouse if either the mouse is over a canvas or an image element of the same domain (or … Read more

How to automatically generate N “distinct” colors?

This questions appears in quite a few SO discussions: Algorithm For Generating Unique Colors Generate unique colours Generate distinctly different RGB colors in graphs How to generate n different colors for any natural number n? Different solutions are proposed, but none are optimal. Luckily, science comes to the rescue Arbitrary N Colour displays for categorical … Read more