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:

419B15
C18D3E
0DDA80
63059D
FAC990
4F9A5D
6E2C49
85F1C5
E35E5D
A57530
6D0029
5E92AB
F3E371
52243B
A2D24F
2B1DCD
4F26D5
4656CC
7E3E7B
F88C14
94FB7E
6CFDE6
F25F79
A678A5
9B664D
0C159E
B6904B
9380D7
D0EF5A
C52D71
BEB5F0
465010
915456
2C1E18
7B00BD
61FEF3
4DC29F
6C9BA4
25C142
3EFBB2
ADE875
6CF098
C9D346
8EC886
8402F6
A9E796
59ECD8
EED2C6
381537
DD611F
05B67A
DBCF97
4A86F2
70A1E3
536E2B
F1889A
3D8C90
002E97
C3012B
F30EC0
979864
D420C8
EF6C45
354E23
3BE379
0ABCDF
87FE20
4378C5
CA75DF
D66512
6FEE8B
207D62
17C2FA
BA0087
060E4A
FA3782
173AA4
E80639
9C0AEF
B8658E
DD685C