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:

98208E
8B1F54
95A2FF
7B7A64
1E1089
8BD147
EDAE46
B36DA2
6C3F41
466BCE
02DF5B
4B43CF
768CE8
C6018E
56B27F
63D53F
93D53D
7FEC13
BC6280
2F40FD
7F412E
A29776
CAF77B
9F7D83
90F86E
9C5334
52A17D
D96B35
6084D5
2E138B
3626BB
60D209
61066F
7653CB
B84A6A
AA4B94
8B372F
BAE1A9
961975
138DC8
2E6369
9E056E
020DD6
7F3473
552836
BD7522
6A27E5
AB4902
2086E9
B5DEBD
2999F7
54256D
EE96DB
4E09C1
E4D3F2
FF9449
79D076
F02DDF
DCAFF4
FDCDD4
CD8B07
64DE9E
7C1668
FBC121
85EFF8
1BA2DF
B74B4F
1D1DEA
6F3640
F7168C
AD8E6F
8120FD
860CAF
590275
D304D5
FFF7C0
ED4C81
159259
8F0A08