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:

7E34D8
78D2CD
7A9B39
571D44
B4A5EA
9BF621
9551A0
2EF1EB
AC4317
0A0371
6A0776
1CF0F2
6157A6
61EECD
4DC8E6
854EDC
617F12
DC9DA3
0B7313
F8D6D3
5F614D
FBF499
86E03F
555968
66D9C7
60A6DB
6C45BE
3A5B09
9CA361
0F9B98
98BA4A
F4CC4E
1BCBA0
87A26A
5C59B8
196F4B
60201C
D245E5
A08B25
7F3378
79C596
C03862
6DD1EB
13CFF1
D0D1E9
F13218