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:

E38D83
7506E9
32BBF7
5C8BDF
82588E
3C39CA
AB86A1
865677
451440
DD6C2E
FBE74B
5F8518
FA7818
355617
460161
19A561
2AC67E
CF8A99
278F7B
0690E3
74D0EB
E49067
96E2A5
F26176
648C37
1DA76E
E1A857
6B16EC
B33AC7
F68862
BBC46C
1DEA30
ED7451
5F0D76
5257C7
C7D194
660F7C
E84DD7
7168D2
580D63
4655D8
0B814F
5B5570
C05DC5
D5CA6C
E54B8D
E8B62E