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:

656C03
B92B10
1DBBA9
21644F
4DC915
31F761
78553A
28AC69
EE7C1F
1AC6C8
66CA0B
1354E0
9D18A8
E95BAA
4FDC0D
CF12E7
86EE06
5B2447
038C94
8103BA
85D8C1
B04F2F
4CD289
E8569C
55F252
9B0DE6
DCC236
9F15AD
5AD8D7
BE6C1F
B5027B
1C4D57
5CAE93
C11958
FA67E4
7172AB
9572FC
51BD49
E3A3D5
1B2EDE
25212A
5711C5
43D0A7
DA926D
308E13
0C6110
FD905C
ADDB9A
FC5169
D942D8
AE7DD9
B6EF64
51D794