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:

553CC1
47B7C9
DE7831
A2F9DB
B3DAA3
DAF1BF
E0210F
A6C9DC
6A81E1
C33989
C43404
8A17E3
5E9D7D
6A35BA
00BA08
64BA78
09FEB2
D1B2EC
3AA86F
F9896B
EA74AD
083396
422986
3E1A0D
B787A0
683020
47968A
B782C4
94D596
B96F20
F0DF25
08F11A
6F6B78
C62E9B
ADFE70
1D1E46
2592E5
0287BB
EBD308
596DCD
FF090D
366E82
6944EB
5F7C3A
2401A6
E7C368
6E8E4D
3A5438
F2F1A7
1A0583
711556
D54D22
3F35E6
BD34A0
A7E4EB
3DC541
ED0C9E
EC0EED
06552D
0DDB1C
1465F5
504687
3AA29D
2CC691
DA4547
17EBB1
83D9E6
E2476C
D5B2C7
38BFDD
8B2555
A00A65
D8AD68
E90BEF
BA7329