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:

7853B3
14C13C
78C688
92C166
DEFCB9
9EE339
9B408E
6D023B
3DA9FC
F29536
EFECA0
71CF31
181516
CA80D4
6CBC0A
426C63
E0E6EE
08067D
26F25D
D5B7A7
0908FA
C9A220
40D4F4
EF895A
A727F6
496DD1
AA320B
B9C982
1F4386
172848
54E83B
8B4B6B
0057B7
20E827
5D6838
320A5A
E5365E
5758CA
ABC590
B84BB9
8FB8ED
68F20D
317C77
BD9C4D
1D22EF
AA37C6
04E6C1
B24333
7C1557
CDCECF
07EF87
6AE436
0427B9
E90887
9084F3
240333
D78E79
369882
CCA9E4
5B1D7C
362BA4
C85373
373E21
8B0EA4
455963
0D60E9
4EBBAB
211C8E
6D3914
AAC636
A39739
8EBED6
B7931D
DC0AC9
664D61
550855
BD8537
84428F
066A28
33FCC8