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:

3607C5
9FD37D
AF9B6E
444D42
BDC843
6201F3
412EA1
0A5FE9
3E7A16
9C4175
BA2ADC
B2B006
5F14EF
D7BC25
7060D3
EFFA2B
2565D1
0A4E52
2DE165
630B07
F87037
F13177
9943F4
1D98A3
A37A80
599DB4
92D007
E625B5
D2B4E2
B42D5A
20B4A8
4F227A
824374
518D7B
B57842
ADC78B
3597AA
3C6FE2
C4F2BB
FF1BD9
BCE28C
37774A
1DEF57
F5CCAB
F811FD
B964BC
415A24
958D0D
38B839
C2528F
761CA2
EFE70C
54A4EC
947D8D
DD601A
6B7BED
E21E1C
33D76F
C28A47
299378
0C8617
B778F3
CFBAC5
F3F324
1D2ABE
7DD702
69DAAF
5D6838
9EAD9B
5F1077
7B3447
E0B1C4
9705B3
D9126C
DCA358
1EE0BD