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:

6E1C1C
4F0E66
8733BD
D4F541
1E961C
6FD1B5
E25C87
B4C620
3B598A
2286A9
F9CC43
63C841
79E022
908B45
37A0F5
380769
2722BF
CB9029
091D7C
2E2B15
3942C2
D54FE0
BB3DAE
AA6CBF
455C93
06F64D
604E4F
CFC419
7F7564
A5860B
9A3297
221AC1
C8DCB9
EF1C80
6BE543
6CAF25
7DF734
89CD9E
16FE3D
5CF22F
51EEEA
6EDCCE
E8629D
E46D2E
20607C
4960D6
8ADD3D
E1C7A3
3B3E48
20C08A
9F5B9D
450090
96093A
92001A
856BAD
B83E55
DFF3D7
3EC6B3
F8BCE5