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:

AB04C4
6AEFC3
2CA419
3F112E
364692
05BAB7
49C636
293BC0
E4CE96
5F483E
B532CE
6A5B6A
970CC3
8C0004
33ACFA
EBE304
5080EB
4EE077
FD2242
CF93B9
55A4E5
6054BE
6EDCA3
D5621E
0789C4
83ED24
E1F991
30A9FC
A7E57A
C3C22D
C1734B
23CA77
F8094C
F7DB08
771DA4
188257
AC9FC0
16FD39
713703
6989D8
6A3CE3
4B7A98
6641B3
DBF2DF
B58333
0A040E
4B9889
8718AA
15961C
E05C1F
A1D27A
92C726
34EF11
9596F0
B89F22
DBB7C3
7B569E
E19C53
89123E
2190FD
FC7378
695B40
BB12C6
9731A1