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:

7DBFEF
E1DE8B
8A1003
16EFE7
125573
D7D483
DC0113
7B128E
E7C3D2
297DEA
907CF0
1B6AE5
5C5C97
CAE38C
8E6C08
EBE7DC
3D2B58
650AE2
8E25A4
C63A6D
D2ABCA
2C09DF
9D07B6
DF5142
14C73A
58DA63
A6DD7F
D58729
328508
4A107D
03987E
9A39C7
75A308
78D61C
291ECE
7F33D6
C79A8C
734FD4
33EEBA
1D7A12
600E08
5C0243
FAD228
561403
BA11E4
447C88
7E34AE
C2E655
7F111D
22C2DA
55E28A
46E28B
B75100
BABF0D
FA6839
C50AC6
208A55
F27B76
C0F5BE
5B19E8
7F0EDD
5C5ABF
387207
CAFC31
DA2D34
50AC30
E3881D
388AEA
D75CEF
5C6E74
8F7191
4F2548