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:

B4793F
A4E97B
DCBC35
E748F7
6B84C0
CE6FDD
FD93C9
CC946F
D009EB
08E6F1
B0B004
21AE01
95F83B
6B066F
C5569A
8607C2
BA08DA
F43F23
17E292
2BF061
1F8AC6
708F4A
BD33C2
3017EB
EDC6FF
55DF00
1407EC
EAF5A2
90736B
A94CD4
2F6B86
27CEFF
C400C4
58682E
A48774
CE8153
CD77B0
7E3630
ED8E1D
EE2C1C
43B806
3684E1
3FC185
E4882A
726143
EA9915
81916B
AC2FF6
C739C4
93B946
65AEE4
FC4D0A
FE3540
8192E7
A6FC04
CDF09F
21E77A
9AC17F
DCFE94
EDB99D
2F2E8D
6DE863
BAD2E7
0D7000
431CCA
C47086
C89D8E
8C237D
022927
25BB7F
9825C6
CF7034
09FA63
C9881C
84AD28
41D3BA
D5C9D9
E4C154