I’d like to achieve a custom-colored shape like this using no Javascript:

Currently I’m overlaying an image of the ‘frame’ over an orange rectangular div, but this is pretty hacky.
I suppose I could use a dynamically generated canvas element, but that not only requires JS, but HTML5 canvas support. Any ideas?
My best attempt: http://dabblet.com/gist/4592062

Pixel perfection at any size, uses simpler math than Ana’s original solution, and is more intuitive in my opinion 🙂