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:

5FD751
530BB9
FABE12
9E6D2B
AE2CE8
5509AD
3E2937
EB562A
DDF942
554394
8868EF
D96F72
D6267E
1D0CD7
F22BB0
E59E77
ECA237
9C78A8
04700E
CB67F9
1C68BF
74C429
ADA011
480A8D
9FCCB3
D543ED
86AAC5
B5B6E3
EBFDCA
9F1533
61EA07
56A4B1
3A3238
32FFEB
2EE912
5048EA
AD8145
BFCAF4
D32F41
C7D141
973CBB
543D0B
6C0DC7
AF6BE2
1763F2
CA38B8
0B7961
D65723
171670
500617
C813D3
657713
48F606
301B84
9AA143
588D90
5CCF42
25E976