html5

RGB WebGL Color Cube

I spent a bit of time this weekend building an RGB color cube for ColorPal, using Three.js. Drag and drop any image, and you’ll see a cube with all the pixels of your image mapped into 3D space. Launch live demo! and view the code. Your web browser must support WebGL, which at this point in history means a fairly recent Firefox or Chrome. In case your web browser doesn’t support WebGL, here’s a video to enjoy while you download Firefox Nightly.

Drop64

Drop64 is an easy drag-and-drop tool for generating Data URIs from any file. Check it out at drop64.com. Here’s a demo recording of how easy it is. Some benefits of Data URIs are: Fewer HTTP requests means faster page loads avoid cross-origin resource loading issues (fonts in Firefox, for example) you can paste the Data URI directly into your web browser URL bar to view the file (occasionally convenient) If you noticed the similarity to ColorPal, well done!

ColorPal CLI!

Tired of creating color palettes with ColorPal’s simple, intuitive drag-and-drop interface? Me too! Use this handy command instead.

ColorPal Output Update

Hi pals. This is a speedy post about a speedy update I made today to ColorPal, an HTML5 tool I wrote that automatically generates color palettes from a photograph. Previously, ColorPal provided hex codes for each color extracted from the image. Eight individual <input>s at the bottom of the page displayed the colors. I use ColorPal a lot (my own dogfood and all that) when designing websites, and it wasn’t long before I got fed up (hah!

ColorPal palettes improved!

In my last post on the subject, I introduced ColorPal, my HTML5 color palette generation tool. It didn’t perform well with certain types of images, so I fixed it. :) Color palettes will now match the image even better. Especially for images with infrequent but important colors. Here’s a comparison of the old and new methods, on an image that is mostly black: You can see that with the old method, the black pixels definitely took over the palette.

ColorPal

ColorPal is an HTML5 color palette generator. Here’s a gif demonstrating how to use ColorPal. The color quality in gifs is pretty terrible, but you can still see the basic usage. Try it out at colorpal.org. ColorPal also has a command-line interface, powered by Node.js. I’ve written some posts about ColorPal.

ColorPal Alpha

Introducing ColorPal, a fast color palette creation tool.

Bouncey returns - more canvas physics

This is a slightly upgraded version of the physics demo I showed in my last post. It is still… “a buggy, rudimentary, just-for-fun javascript physics simulator.” This version has: pre-defined initial states gravity friction It still has the “clinging” bug. I know how to fix it, but didn’t deem it important enough to spend time on it. :) The code is well commented, so feel free to hack on it.

Bouncey

A fun, simple, and oddly relaxing hacky simulation of bouncing circles.

Bouncey - canvas physics

This is Bouncey. It’s a simple physics demo I wrote in early/mid 2011, with some contributions and bugfixes from my good friend Greg Gardner. The description for bouncey’s github repo is: “a buggy, rudimentary, just-for-fun javascript physics simulator.” It covers Newton’s laws of motion. #cnvs { margin: 0 auto; display: block; width: 100%; border: 1px solid #464646; -webkit-box-shadow: 0px 0px 3px rgba( 0, 0, 0, 0.7 ); -moz-box-shadow: 0px 0px 3px rgba( 0, 0, 0, 0.