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:

F14B08
DBCF76
2554CE
FC44BD
3F9AA9
7180B9
E419E2
76FA5D
E8C404
A90BC2
E34DFC
E8C385
FE046F
6CFF7A
B70D68
D98682
88CAF9
B3AEAA
694A48
4E0DE5
5D00BB
634028
2B72B1
D75415
701A40
F8CB36
9989B2
C9A851
0E607C
90A704
5953BE
73ADF6
F39EC7
E19B6D
E5F584
D529B8
754FB8
B35330
71B357
51CF1D
AD78D5
61B687
770674
35AC7A
508C29
846B18
24F1DA
91FFB1