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:

44A5E7
9A3A5C
4418B0
52BA41
BEF735
49CCD9
AAB37C
F3E0CC
7320D4
643D7F
51006C
F45010
0E867D
505549
ABF4C9
E4870E
AB0091
B7503C
FD24D3
7FCD72
C8DFE7
C45AA1
1CAE8F
C2BA36
6D9A02
31A67C
8558A2
50C881
FF9FCC
03E21D
CC463A
947661
74FA2C
26B4F2
FF7B8D
491EC9
640BB9
41B496
AA6BCD
44381D
747E97
84D1AC
D92D21
6CB6CE
1EF677
6EDAE5
0AEEF6
85C385
56211D
7BA4B1
E15522
91FA99
AD42D4
645F9D
79414A
EBA633
613132
758E3B
64525C
BFB06A
CC31D5
B73F19
2F7F98
7E26BB
495911
80F5A9
FC7360
41AA9A
9261D6
664460
0AE4C0
379162
77E606
442256
7B2FD3
A2A436
414E96
846525
D8344A
7EB627
54A516
F92114