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:

CD9061
69BFED
0C9344
C2C86D
440642
FFCD39
AC4630
1AD488
F57BFD
159345
BE015B
2CF885
C7059D
B2CDB8
84CEB9
8DB011
6FFEB3
CD9557
5298D3
1EC218
8AD5A3
79E52F
C023E7
578E7E
285F0A
5DD8E9
87CD0F
336BB9
D50BBE
E39033
5A0536
287BBF
942B65
DF95B3
ECE88D
D77060
D3E712
C047EE
E522F3
C9080A
870379
D46D0C
E1866E
029B72
7804F5
2CD108
EC3ABC
29C261
C10A31
46D4B9
CC0125
A51DF3