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:

974112
FBE26A
77D734
BE8438
F600A9
DC3170
F03E0C
10B354
6110C2
8D362B
AE6930
637626
65563D
7B26D2
71ADFC
562D82
64A521
D77C7D
C98224
FFEA9F
30CD42
00E506
C72DFA
B55D19
02712D
145FE7
BA1C45
A3BCC5
4EE5B2
51C7A8
6CAB59
D51FDF
62CCCC
F11FAE
F05826
4EB736
D012DF
BE379B
F89374
59F972
0CFEB7
3CED5E
9B0516
E0C260
770F3B
A38848
AAFA34
221B50
13D4D4
880543
B02F73
BC8CB1
5C4037
1006B9
B80744
DAE4AE
1F43B2
CB04CF
D1F47A
7947DE