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:

344F70
86BC6E
5211B4
FCE1EC
A26ED0
353A0A
56FB70
654FF4
125869
3CC383
C6A7FA
78158B
BFF6E5
F34E8F
16365B
AA0C9A
9AF8D9
89A647
F88DE4
60DFC2
222B94
47DEF9
10C535
0D5623
5F1463
EF8D99
D97259
FF9E0E
28E1E3
A44D73
DE56B2
7D8945
FF1BC9
16F0EA
E7F86F
40BB96
B6AC23
3DE823
B22F94
DF2087