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:

F62C34
FE64B4
245997
AF62AD
89096A
EDCC97
E5FFB1
8690C2
B0AD00
20E751
351534
C9DC4C
3AEC22
A90DF2
26BE59
A1490E
3DE48A
9EFFEB
BE49A1
CF2DB2
9FCED2
5A9BDD
B2857E
FE3721
9D85C4
DB7C9A
BBC18C
2AA745
FC2976
A3116E
B9E478
9A38BD
E9C241
9383BA
FBC71A
6D32A2
33DB27
779A62
57D730
931B8B
0865A4
A6AE98
5B46F2
38E7BE
E7A2B3
EC67F7
73DBC9
3F9A61
4DEF3D
FBD0A9
A3BF98
CDDDD5
B4157B
BFAC24
51C787
0048ED
27B42C
87E5EF