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:

1C786C
1022F4
C104AA
844C4A
F6F509
B9A541
4BB658
BB551E
5E373B
1D3F05
8B4249
C6D34D
4D4870
908393
7DBEFA
3D5173
AEACD8
E7DF16
0EB156
8B0576
4C9453
87E34E
CE4962
AF76B8
BE27AB
415BC0
59D7E4
267E84
4F136E
011E50
296106
53545E
D234E7
49938A
10A47E
EFF758
AEF753
C2AF6F
41D457
A6267A
E72A4F
9FB2FD
8D45F1
F0BCA7
CE8B1E
E5FF76
438E52
FABA30
7B2EC1
2D18C4
B01551
34AA7C
CA426F
86DD22
F1A920
D2E451
D62BBD
EFF4E4
0906D1
4C2DC8
41DEE7
BABDBD
8587FC
2005A7
5B2A82
6007B4
192B4C
404A16
6B21DE
EB867D
8B6B83
BBD309
008608
7CCCCE
DD4507
270920
A1F120
F9380F
A37BC9
5B96F1
D8B3FA
5D90EA
4560DF
1DD232
4F23F3
CF6880
77E4CD
BBE817