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:

376B7A
D9CBE0
1EF9FA
09A285
9642DA
4BF62C
5B95B0
305DC2
45CCB0
6C0822
B34555
AC73C3
C34403
92AB39
0958A7
7ADDB8
6A3C49
C3C6F7
A25E77
A68CA5
962525
6455B8
8991A5
7352F1
C66D6E
1529B8
E779D0
1F03CB
8E075A
7AB893
8399E6
5A1CAF
6A3177
EBC43F
36801F
91A757