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:

C1367F
CE0393
C378D5
93DB75
2BB17D
184A7E
7D8215
7A4F92
44AC4F
714EAE
C7D240
F5DD81
12ADC1
525333
A67FB5
0E5787
D3D705
079F74
88A442
2920DF
CB2F18
5CA3FD
AA6A6B
B3AB9A
4625EA
476FD2
442F0E
1811DB
8BCEF4
E45CBB
1DC24B
7DD91A
ABB9B1
A1502A
ED2567
3A6D93
EE6158
379D44
65C6A7
12F5E9
7230A6
488B7D
FA1D03
E91CEC
2E7524
44B977
17FE84
E59CA2
C47ED0
6829C0
C4BA50
8431E4
8F82A2
00E2D6
7C3002
711B02
BDFC26
BFDBE1
7F78CF
11E2AC
04E98D
6137DF
23495A
B2460D
0460F6
EF79F4
CB6420
642760
B2EB01
6D049D
44457F
5356EB
57724F
2732BD
BC75E8
457BA8
457E85
299E27
D58B8F
351654
03D8BF
077D7A
19911D
F7C182
FB3042
C489E4
4666E6
43FDA3
2F4567
486753
C470DC