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:

0E1045
430E5C
8F6A4F
8A5320
241E97
F0B47A
7592BD
4A967D
537BD2
5BB970
C7FCDD
B77473
4780A3
AA4E10
E79E4F
E2D841
D70491
B772AA
148F7A
928676
2428F6
95E607
E14969
AD9417
B025BB
D7186F
826CFC
DDC722
45FDA1
0E5795
223E3B
22528E
73A6D1
329BF4
67D3FF
EBCCE2
15DB69
7457F7
036BD1
D13D6F
AA790B
AB1371
E175F4
BE92E0
7859B6
E38DC5
CBAB5F
7D7754
FCFE17
0BE99B
372A7A
AE7B26
306E14
8546DE
E53523
2FE100
66C3AD
F2840B
A68BF6
EBFD0D
28D6D4
C79866
0AAD76
C3EFCA