Home
Source Tarball | Source Zip

This little page does a few nifty things via PHP:

  • Generates a random quantity, between 1 and 100, of hex color codes.
  • Calculates the best color, either black or white, to use for the text to show up when displayed on top of the color.
  • Populates a little div block with the color as background and the label with the white or black text.
  • Calculates two darker shades of the color to be applied to the various parts of the object.
  • Randomly picks one of two different object templates. One faces left, the other, right.
  • Paints three of the parts of the object shown below
  • Combines each of the four parts as layers into a single little object image to be displayed next to its color block.
  • This is the right-facing template:

3ACB82
F9A15C
D73D46
0AD2B9
FBDD76
621C2B
4132E6
0A2C03
F61662
8E20D7
EDBD68
400B81
3A3F42
32DF6B
D0D321
3BD9CD
693B19
600A98
1A3836
C5FB3C
0DA8D5
F618FA
8AC229
B4FDD7
680B20
B789FA
88043C
9E156E
31C20F
B6160F
4F37CF
3AE8CF
C38331
8E5F17
1A2AB0
499D83
5D7C7A
0CDEA6
D51929
002383
47EC57
1DA96B
2D10EE
C900C4
7223F8
F9FB42
DAD4A9
CA8F28
AA14B5
8AC987
28ABCF
4ED62A
3D381F
149E5E
722451
A8ED46
80EEEC
68825B
1BA40C
C160F4
067CFC
319C14
110D4E
2386FE
38F0BE
2F9212
6D3BBB
1E4077