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:

DA43A5
7D8C9F
D21D11
AE98D9
5AA396
757B07
994B81
B9268C
5DE63E
BFFF4A
9C4B76
6E2796
1661DE
8279C9
0A6D8D
00DE16
A47889
215C18
750EA3
C00F04
ED2383
B037C3
4576FF
02ABC6
6DD841
093DD0
0323B3
C249D0
5CDB56
27B231
027C3B
C31884
ECC223
520A88
D7D52F
48DBFE
DFA536
D0795C
628407
46B809
FBD756
4C6B57
A0AAA9
E0CD3C
A0E9B1
9FDFF8
AAF6BF
D7AB18
274437
9B37DD
0361DF
B9A3A8
7F0148
8D5941
8FA7EE
436DAA
C5941D
1D8219
B3B7EC
6C861A
712CB1
F1559F
ED8D56
479CD2
E35FA2
C24211
9405FD
DD5F3A
84409A
3D8854
F0BC2E
0982C9
79A484
39B0BA
2A71CC
0B4C39
5AF16D
C4AE77
9BE9E4
A5D2E4
B0E73E
94D878
150425
1690BC