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:

DEF940
93CC5F
C67A94
767226
EE46E8
76E1D9
3AACA2
456744
36A7B3
1D85F4
8FE701
E2B87C
4C0B49
BE9C4F
D09441
60AD2D
1B161A
7E7BBF
8480C0
0C3F0E
3236B9
788BC5
F8071A
61398C
408696
A98FF8
C4EDFA
89B14C
12FB56
270969
F91CDA
27DD5B
A4FCF6
B3E3DB
B5E3E5
319FEB
8E1B3F
01BAE4
857736
F76620
FBB8C0
AC74CD
D04E75
AF8606
00EFB8
086F3F
B94954
8544BB
C11C80
B4C4B6
3477B4
B71B72
D9AB4A
EE922E
188018
9C00EC
6EA9CC
C921B4
FFF9DB
4C841D
0553D8
2D3DEB
A062DB
068E9A
0E6141
7DFD3A
01DC61
898A77
3EF855
34E89B
3E2053
5F8E79
D883DF
722B84
0B62B8
FBAF4E
2ABCF7
295232
BFDDCF
379FE9
59DBC7
3332E5
5A43AA
FF2C69
F75604
B9D9F1
60C2E8
ACBBA1
0EEBA0
453C23
60FA97
A78E0A
F55AEB
10A89E
24B19A
153269
4D23D5
1143DC
56C127
1DB8C8