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:

070FED
878F28
3761BF
D9B870
A2E805
B9B806
2229AC
21A6E3
DED174
364F32
1EDC87
5C2F34
99BAD4
461698
3B9868
23939F
FA8BD1
687F7E
085348
18C26B
AFF789
2E6545
BBC9FE
614688
3D4B9D
760DB9
559796
2420B1
95F3F9
7D9D8C
56FBD2
BB2B66
3911C3
555F7F
CDE069
F4DF69
CFB3C8
AB2F56
29C6DB
DDFF50
140EE3
FFA19D
92DCF3
875EE7
90FD84
106A5F
65C51C
80B4F9
846DB6
DC205A
A92B76
35051E
92A9AE
064639
960778
1D8E70
D6DCC1
AD7F84
EF6621
8B453F
1905D1
6303EC