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:

9ABAD9
6902E0
2E265C
8D0FC3
7B708E
9402BD
7F2F52
447458
F3AFEB
52531A
648005
4289E5
463C30
C90D70
9817F1
E8A896
EC6066
2C8294
BED87F
EF8190
0B3B8B
938FFA
D49089
011B94
0200F5
EF9917
CE6F8B
4F8C61
49853D
675951
286450
1357F9
16377B
EA05F7
552740
B11614
C4970B
E65A89
CC53AB
223BFC
D9A23E
BED467
A1F2C8
B5C8FC
62119D
9D693F
052A7B
109361
7424B8
4B7FD6
335A14
63C10F
8FB6DD
4BBE06
23DC87
987375
28917F
F90CD9
D37544
F4CD61
8BBEAD
8DFF1B
F778FD
EAC62B
BBA5FF
CE9785
491799
0B020E
0B386E
A51341
018630
697E68
CEF6E8
EDE920
32DD07
AFE466
AC48F5
8E8EF1
E49489
9CB748
33F87C
47C3A9
DC5E1E
CEF166
BED628
4C0A76
AD0724
A32CC8
3F5C44
DFAAEC
5AA8DD
D19633
EEF0BF
27B57A
6D4F1F
F6E9E5
939FC9