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:

4A178C
72FE3B
3FABA0
D7C170
D9BDED
2F4EAB
E68F23
2E89CE
34F598
BD9E23
528F49
06BF0D
6FF85F
CAFC21
F5F3D1
4C1F7A
A7CAFE
F56028
8D597B
2095DB
3912EC
A96B20
D703C8
9CAF0C
8B5646
77E14B
E5C27B
AB6832
0462BF
E8E2CB
D92850
641725
1BD651
66BAAB
0DBCE6
837F24
E36FE1
494D78
4400E4
7D1F28
428EEC
40D947
172F17
171A50
EBFBC5
B5154F
94EECD
0946E5
0D82ED
617A5D
03D475
A23557
843EAE
FE8654
DF0C33
BDF0D8
3BB906
02B66F
6B5CD0
EBE43D
BAC743
1DC7FE
87E6FF
10579D
E72F8B
3A6E36
C6B2C1
467FDD
7AA5F8
836534
82A615
D072C1
0DC0C0
DED654
B556AE
82453B
7D1BC1
F64504