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:

8FB545
B2EE6F
C3AA0A
280BFA
997E4A
7083F4
52B8C2
23F81A
34D793
1F0895
989B09
64DE06
1598E9
F50A25
638BA6
AD4B64
C6C3A5
55264C
55F20E
E4E8EE
CD974E
743353
7F698C
082F51
26AA42
CC610B
42A6A4
0456F0
1AA9B3
B7F225
2FB664
44ADCC
4B157B
48914F
1C55EC
AC4F19
D57D04
9F1471
32C357
674AAF
5BE5DF
203A08
B3D77F
8D0834
7EA5A8
F02CFD
C614D1
14DF80
4280FF
853FA2
BA44F9
871191
4D4523
B8F69A
CA661A
83D6FA
26B650
48F702
D67430
F08D7C
057890
F0A0FA
8892E4
DC0A37
3DC405
CF76E0
A7D8D2
CDB615
415C24
4BBA5F
96A725
269A8D
02F59A
E62B12
4F161B
CECB53
2F3D7E
CC9089
CB34C1
8E92D8
73E760
D654E1
F1690F
18A6DD
DB233C
0B6299
95BCA4
93EED9
D3DCB3
39EFBD
75CF69
97FF1B
9213CF
AFF287
75C7BF
66E1B7
C2EBC2
330FDF