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:

12745C
A4C8D8
A8347E
4F07B5
EE3660
FD63DF
12BA4F
200B30
81E19D
C702A1
866C55
91F449
F22D19
025CF2
F9FB0B
92656E
5CDC06
9C2FF5
30C8D2
2C0374
8787EF
497CB0
F2F071
76F6BE
F1A489
B17483
10F329
3A1EBB
015517
0D1BAE
2BFF94
C90CA6
CB85BD
E218FA
8F6027
97D287
73FE90
2DE8DA
72CD14
96598B
2B724B
CE3EA0
0F31C5
E0FA68
170F9D
3B2E47
BF825B
1AB20C
0552D9
8AD410
B5E92B
61A6C4
34DF00
20524F
A5FE49
CE6931
FB6394
48F24C
3A98BE
84E695
9998A1
0CAD2F
CD1A5E
04245B
5F83C3
3C2CD3
E0E498
631D6E
E267AA
5D581E
917AD6
9E8CD6
2F28CB
CD2391
A5C3CB
85D328
F1FC27
9915E5
46D063
43398C
E092EC
1BEF24
5A8DDC
E882E4
2D36C3
481BAF
39132F
7B2E16
F5ED26
88E224
95B319
3FD814
056B0D
0F9595
CBEC0F
E0397E
0B1AFD