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:

E485BD
0113F0
B390D6
8640EC
78246A
0ABE39
A66839
28B46E
5F0FCD
3AEF7E
044366
690C93
3C5E52
D688B8
0368A8
AAE115
49F207
CE85AF
2F7AFC
AB3551
9B4ECB
FFE858
BBA172
DAD147
60D488
FBEE66
217B5B
BBB832
8D8367
3677F0
71D8D2
476EB8
32BE80
AD4A73
B53ACB
9C2B37
020075
1243B9
2A2919
0F2B26
FD90B4
0E9EB0
3DC154
DDBDBD
46E508
CF1C71
F1FC17
7B4A12
C3CF5E
74A755
39CD98
ACD957
70C094
B623B8
19E781
A78732
7AB655
C6D528
434306
C421BE