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:

911A7B
FDC485
168DDB
5C3D17
1F28CF
B4A458
40ECD8
998DA8
6E0635
5948D4
1C761A
E2D48B
D8770A
47A67D
30F8A9
7660D0
AEE1F8
EAA50A
9044A9
B67A5E
F8E34F
95BA43
9F4C50
10E202
066013
D255DD
8B8ACF
55B97B
8E5EF8
1B374F
D266A9
CB0B20
D53562
91EEE8
98B065
A0FABD
95813A
1A8008
17F0BD
F1499A
EAD2FB
1ED770
03993F
64DFA1
DC31DD
006133
CB8FC1
D0C5C1
AB3733
B2AEB0
FEF010
C84F6E
7A23AC
0740D6
21BDCA
26AFCD
E23F9E
D42849
262D1B
064933
5E2C96
F71A6B
E28B5B
5C4838
684D33
5C4C6F
683811
3C0D57
03D833
857609
682A2F
FB50B7
ECBE00
017C27
816CC6
292A8A
1C07BD
957E8F
98B526
9838A9
1B77D3
4F1BE4
1F3DEA
6340D2
9A86C8
880464
271997
4821BE
157E4C