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:

C569EA
0A99F8
9B404B
365B8C
DA40D6
2BA87A
D5F029
525B64
888F0E
8F5656
A874E6
1C02F9
F46E50
C78CAE
EED43C
A2BDAF
5F7969
DF8D20
B9EB76
309519
523D35
09A912
992781
AC3F19
0B233A
3A742A
E08899
B0C48F
14E138
7CDD38
1253A6
63DB65
F4F572
7F4F38
2D1521
B68609
5CA390
0E87E4
5E4594
4AF4BB
21FE92
142B30
FD4EE4
6A8283
C742D9
C920DE
59E052
ECB408
3E0C8B
57B8A5
5FE126
FDF3F9
8F91BD
AB48E6
CBD063
F6BB08
C5F044
88B6E0
0739B7
63121D
AD8B51
569ECA
5DE2D6
A01DB6
F2DDBB
F6C4E3
647E4A
A77339
00B26A
B75734
4DFD70