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:

D38F10
3821AD
446642
BE73EE
CA700C
FA8CAD
92875D
8421EF
44E973
EC0960
16A159
634FA5
BCF8C8
264427
968B7E
058507
B06D56
C214A5
AEE932
41FA32
32FD2D
835ED2
98A743
93AED2
190D82
91AD7F
9D48C8
760C5A
02784D
5972EB
1A81BD
09F428
848782
2D0AEB
6BBD02
FE3425
AD269B
83D49F
01027B
70FC01
3F7C37
E93654
1A52C0
BAB4A0
8B9A1D
6911ED
2E5C1F
9BDE29
4A17D0
C88DBA
01E1E5
BA8680
FBCAF2
9E9E0B
B3FE13
2161D6
5E7058
023EB5
D218F8
82F664
C58B48
136660
9BB9E0
0C3632
6E9189
B37828
3F112E
955186
9FEC61
445E32
189B6D
ABA0FC
EBA7FF
E7209D
31CD85
1E9BD4
4B0B14
409145
F7B716
2DD639
7889ED
6C8039
DA8C3D
64F0DC
C7A550
4CF5AE
340423
461097
0570A9
A6635A
ACEC1D
38308C
42BB28
2C431D
BE30EE
64D226
6EAAD0
AB56A1
F30F43