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:

078D9D
592F28
79556A
AB0038
11FE0E
94BAEF
908F44
1E5157
3DD83D
EA955C
A7EB9A
398D47
BB686E
240C06
FF65F3
F9FC5D
CA24A4
5ACAAD
4F828A
DDB792
0D5BD0
F93756
50857A
FB253D
E684A4
02B89A
9B00BC
89BF0F
49186C
645BBD
5B476A
EC7F39
BCE993
54D328
537C59
0416FF
1B9FD3
BB1F97
FC24A1
793C58
093492
890733
9C899C
87C4FF
4A57A5
D1F3AC
B2394E
71FDDC
867ADF
D56F79
D39E85
255D18
34BD9E
B8D6EA
8D0558
34D86F
70F4DC
E22CF8
768034
182AC4