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:

69AE23
396366
CD6FEC
E4E524
587E7C
70C5D6
37283B
95B0A7
1B1DA6
4B0C3C
23EF89
E9F9B4
6758F3
DD680B
8ABE33
EA6760
1574AD
E99227
7CBF43
745A6D
E5029B
AEB49D
5571CD
50C578
A4AE0E
FDE3CD
0D3EEA
9DB863
AC96D0
268523
89A4FD
BD8AAD
8B90F4
CA08A6
3AFF0C
70942D
AE56E8
9B4FC8
7913E3
B62DC3
FC5598
8EB673
B102CE
6DD840
C844AE
9AA8CC
C9D0A0
D52CCE
364A25
D306D5
7BC2A5
68B0D9
176DB9
FF761A
D3B63E
37530B
073CA6
E3A3F1
6E3F86
AE826D
85C47E
AAC4AA
053E2E
21C30E
4CBB6C
69BCDD
602CDA
642564
65BCDA
CA903E