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:

E097C1
BDF07B
B810E1
D5FBD3
FEAA63
1E4350
41BE8F
F38F92
323505
70513F
E58F5A
190BEE
551906
FCAD65
9D1547
450F42
29FC7F
D3118A
498AB7
54363E
8DA9CA
F92492
E51EE0
DBCCCB
D96B41
FACBD1
AE72EE
9A0CA0
2C826D
D91932
4DF8B3
EE271C
147CD2
698092
CF7277
279592
B50273
E2353F
5AC2D4
A67FD5
9B8C1E
3FF03F
1B87BA
D3F18B
25259A
BE5000
5F1A57
3EC6C3
C76388
57C32E
AE8758
6E6425
EC446B
81AD91
3F33B3
E292B4
325B89
77CF4A
3216D3
97C247
3E09F7
071986
343400