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:

B35146
3297CF
505109
7775DF
CF2DA1
91C2F1
D2E9CD
26E0FB
B019F2
6CB739
782084
5741AB
838C3F
F2F924
CC23AE
5F28B7
8756CF
B7F1BC
599091
DA4653
18276B
F581BF
729F8D
563E2E
DC0111
720E07
1520A8
F8C081
808B2B
BFB52A
5C1616
B23947
8A3602
7BBCA7
746BA6
1D5580
35A32D
C10A88
A03B2A
256373
6FB81E
1D5879
DA815A
C04C1F
D016C2
7024C7
C2BFD4
4BE0FF
2D9361
637AEA
94FA7F
ACBDCF
157F30
3487A0
88FD90
032954
EB1FA6
EA3D74
3A2FD0
FD0E6A
5D6B9E
BCB1B7
3A6F91
3B37B0
03D9C3
2DFF47
F54826
20EF6B
EF8E75
C2EAEA
B35873
65195C
58DCE2
9CD7CB
943032
7D88E3
FA6B20
32E0A8
E87812
A199CD
410826
82365A
B3E25F
F4E49C
BCF111
D43E1B
ACD507
78EBCE
473437
059745