Zach Beane (xach) wrote,
Zach Beane
xach

google's own cornershop

Because of cornershop, I've become a rounded-corner fanatic. Whenever I see pretty rounded corners used in webpage design, I rightclick and view them, or check 'em out in detail in xmag. I want to know if they're javascript, GIFs, PNGs. I want to see how nice the antialiasing is. I want to see if someone made them by hand or if they look auto generated.

That should explain how I stumbled across Google's rounded corner generator. I was looking at the Google Groups beta interface, and I had to see how they made their pretty rounded corners. Lo and behold, the URLs look like this:

http://groups-beta.google.com/groups/roundedcorners?c=999999&bc=white&w=4&h=4&a=tr

The URL above produces this:

A little small and boring, sure, but a bit of URL surgery later, and I was getting stuff like this:

Parameters:

  • c - the color, as either a name or a CSS-style hex color spec (RGB or RRGGBB) sans #. The color names are taken from the CSS2 spec and are as follows: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow (thanks, anonymous commenter)
  • bc - the background color, same acceptable input as c. One twist: if you leave out the bc parameter entirely, the background is transparent.
  • h - height in pixels. If you leave it out, uses a default of 8.
  • w - width in pixels. If you leave it out, uses a default of 8.
  • a - which corner to generate; tl is top left, tr is top right, bl is bottom left, br is bottom right

I love it. I didn't immediately find an upper limit on height & width.

It doesn't seem like the hostname matters much; I used www.google.com, groups.google.com, and finance.google.com and they all worked.

I was pleased to see these are almost pixel-for-pixel identical with corners produced by cornershop:

One difference: the Google graphics aren't symmetrical! If you rotate and flip them, the colors don't match up exactly. I'm guessing that's because the graphics may have independent height and width.

Reminds me of Amazon's image generation on a smaller scale.

Tags: png, wigflip
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 22 comments