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:

CF45BA
2D1DF0
AABF67
CF6AE4
6BD71E
E64CB8
853592
D07583
956901
C32453
77EB8F
D3B8EA
810BFF
B001CD
CC498E
B14590
2EFF36
0599A3
9E05E5
7B31C3
1976E8
D90CB7
805E3D
4A4F07
62EB5D
08F506
FC264A
0F1397
4FCA8D
55294B
6C6485
656A5F
18750E
70CEC2
8EBFE5
3AACA3
6E67A3
0715B3
62EB27
9FEBA2
5C8945
393AFA
53F077
FD19E1
9AC164
D67065
55B73F
5D20E2
544BF7
BD91AE
2D22E6
FDFF48
1604A6
508A9D
9A91A1
512797
FBDE94
C3C3AA
B6C5C3
5057F7
180DC5
F3E268
B0C031