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:

45343E
B58C25
57B37B
C4AC42
CEDCC4
0A5E07
ACC609
A2A704
42B32E
75E765
FAF7B4
A1F055
BA3402
B30657
9262CA
2F867B
C3BC39
A26E49
B6DB17
6C69D9
FA781B
F7F36F
4A909D
1D486D
C4624A
D71EFF
68B9F1
20D68B
91CB36
F93BC1
4F3669
F2D7AE
DEC80E
9A748B
066C7D
359B64
739B38
B9D000
4E14FC
905602
6AAD37
D420DD
DFD044
F5267E
D0727F
D44521
7CC1E2
3F5CCA
87893A
E714A6
8315F1
E1A47E
1B7DDC
71EE8E
DB5954
2BC54E
6DFBDD