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:

5C096C
64D520
F87C87
D95401
8286AE
9114C4
17B425
F83AFE
593C5B
3C9C79
2BDBDB
502B41
87BA2D
493F85
5B39C7
414C1D
4BE05E
5BD2EE
3ED91E
621FDD
2076D8
632E82
FBE4B3
C217AD
6281F1
FA26CB
FD6629
B284A8
04338F
B845D2
350265
AE9573
C351D0
591B42
36ECBB
B275FC
3DFAB6
EACED5
4D814F
5C8C04
BEEB59
00FE8C
0A5CE7
211464
3B426D
BC881E
B9CBDA
DCA476
375195
30CAC6
9CA87E
17E471
365F29
94AFEE
9709D3
39901E
F1A221
F5D2AB
838E15
1143BD
6F6899
62EDA1
CAD23A
87D0EF
21380F
193083
C9A6B2
DFEFD1
A335D9
0C872E
BF1F26