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:

80C19E
125929
8BBC0F
061EC9
C7C349
2CC59F
EBFBC4
3A103D
CACC5F
43A56F
604CDA
733FE8
1C2D13
C67EF9
468AFE
19427D
E844C1
017027
E62A8D
5CD6B9
011338
11A1DA
385BF6
10E34B
731E25
EA6E57
BDF479
ED0C91
B0278D
0749C2
8260B6
B1C534
B731AD
03A9FB
485737
47EB06
6D20E9
976AB5
F1A6DD
186505
E5B2F9
6AB4B8
E807C2
902522
64F701
C93CB6
764303
0262CB
9BF1F5
12536D
E28171
9CB362
648541
A77D33
18D58A
0C207D
BE175A
64CEA8
D84D15
3F1A78
C11F5A
7CCE03
175E16
F215EB
80CEEC
BFDCE7
6489F3
CD492D