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:

C3343E
8F23DD
FD5582
9436C5
B62DC0
6B1463
DFEF9C
AF4247
9090AC
853AF9
D12B2D
10DA0B
F29569
43B5DB
09AEB6
C0BF2B
564725
CFA889
4189E0
E37F2F
806584
D38CF4
2A0026
4827D9
704307
A7EC5B
83D57D
C19FD3
376294
0F5686
64A958
495824
A60EF3
AF0419
3D93CF
2029B2
539DDF
A1AEFA
2171ED
31DA53
905327
D33EE6
259597
05DED6
3DC247
C10874
CE3C34
E4A8C7
2E2956
042700
6B0852
4E192F
FE82E9
D2D947
17BD72
BAA0A2
BBD0B2
491379
C8B8B8
B5FF50
83CDA2
091439
34F57E
AD9F3D
C54916
0FFABA
94F8B6
48FEC9
2546B7
BF68BE
32D6AC
0CC87F
EF1E81
6EFEB9
45E793
6E6EB9
9738F3
13C522
C62410
0A6C73
AF7C48
CF035C
626651
F1EE9C
D8BC1F
052532
C263F5
B81EFB