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:

98F291
E7CA0D
B60356
EB5221
B7F407
84235F
205105
21281A
A66A1B
E3AF0D
82910F
CD4235
CFEE75
426DAF
A6AC56
B810B0
B52B5A
8475E8
8D8EED
76212D
16301C
05ED6F
E9E011
5A174A
B100CC
C0E15A
D52C0A
D695C2
DA0251
D3286E
C4DF83
02D2DD
E5C7E9
2FFC2F
144229
90E256
8839FC
47BC48
142C88
033465
F7A32D
E56F17
E5815B
23D3C2
A55C39
6CA891
F99CF8
CB9B04
D098A2
7DB517
F3DE89
080A46
B468CF
8485C6
6F3013
EFBC46
D6B824
1A0CD4
85F5D3
50C4F1
D8423B
064509
6EE8D3
D8792C
25D9FC
59711F
547CE4