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:

F32B32
A48725
77751E
E6E364
FCE5A0
64D635
FCD134
C1D3BF
5F26CF
2AB2C4
E9DB49
D76CB3
FC9891
A1A9EF
F01792
5FFD00
7AE5AE
3495B9
BE1ED5
8D8A5D
8BA05F
95C445
6A6695
D7D889
543985
580035
075B2E
3FBF09
0DA5DA
C8FF50
A2E81B
FD3E14
615609
90CAA2
3A5E47
ABE63E
ED68D3
2F463B
5ABDDA
032C03
4325C3
5DB101
1AACE6
D9FB4F
B05C20
CE01F2
D70C7E
7B4BD2
4A250E
9C3801
50DA95
75AD87
E3E760
DE2EAB
DE037A
B2FD55
FE6BC7
9DDA1C
CE4390
294ABA
3F4794
224C5B
339ED7
11EEE1
1E0A03
8D4507
34D6EE
8A196F
9D4650
AC3A5B
CF7661
D87DBF