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:

B66A6B
468B0B
6F96FD
9D5357
19F737
CB4575
69247D
DE1448
19DB73
9C22E1
8DF811
FC8DDB
AC33A7
AB1E1A
17D339
6C1054
D1BDBB
68F77F
3A1CC5
1E0A3C
1F2965
D4924B
0A530F
A43E70
E1230E
C73C7B
DA5CBA
15182F
693D96
834C71
F0E5A2
F819F7
96987F
8ACAB5
7B9D3B
2B86D4
81CAF9
FA1EE4
DC12EB
0DE535
85BB74
0EEE44
6E46C5
A68E41
980D23
D3B30C
0BFEA9
6C21D0
2B973F
C5B965
617C72
1F3038
0FD685
59829C
80EB4C
EE2A1D
C51AC7
1B7879
4501F5
381BEF
A7F5F2
79E3A0
DA890E
CD38DA
2455DD
4A8309
75A9A3
5CF3D5
B85BAA
199296
CD232F
D806E3
FD16BF