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:

DD594D
34E023
AFC01B
06E512
D95016
FD6F01
8CC027
7AA62D
F5388B
E78B09
C33AD6
B15517
65A096
171384
770F50
2C6802
2613BE
5B2948
3FB6B8
C55457
5631DD
1D412B
63340C
0AAEE9
C5B03F
BFA21B
73043C
4AF67C
09731B
64C918
64D55D
D6AECD
0DAB4A
BB54D2
63708A
458BB5
605115
78FAAD
989A4F
6602E9
AFAA96
68DE77
5537C9
C3ED8F
34173B
A56701
3C2D5D
4643C0
24CFCE
32B8A9