Shapes in SVG using PHP

circle square disc diamond

n ne e se s sw w nw

n ne e se s sw w nw

About This Project

There are 6 shapes: circle, square, disc, diamond, triangle, and arrow.

There are 8 directions: north, ne, east, se, south, sw, west, and nw. Directions only apply to triangles and arrows.

You can also supply a direction as a number of degrees.

Like some other projects, we draw these shapes with random background colors. You can see a new set of random colors when you refresh the page. You can also specify a color (see the bottom of this page).

We calculate the internal colors to contrast with the background colors. This module happens to choose between a light and dark shade of teal.

You can view the PHP source code for the shape generator.

Make One Yourself

Shape:
Color: # (use 3-digit or 6-digit hex without the #)
Direction: (north, nw, west, sw, south, se, east, ne, or a number of degrees)