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:

C4A447
0105F2
5EA576
05CE48
539986
5BDB4C
655A6D
131BBA
B51FD6
F71A43
1F32CF
8EF937
49A6E8
92CE14
77BE19
48C952
B300FA
29B793
AB09E7
8CB74E
3414D0
DBAD99
DAEA03
A1D51D
578DC8
2DF7C6
17EF2E
F23826
8233FA
6C3632
ABBFD7
4C1BF3
3CC81F
C474C4
0ADB7B
E2D4CE
4EC28C
C3F82D
911AEE
E4688D
0A424F
25D8F4
8811A8
FE9939
4E501F
CBF69E
325DC0
F0443E
05731C
A5FBE6
B2C600
077CB5
DE986F
D022D7
3771E8
D30E9B
AF4D29
09B436
746838
8C971F
3D6606
E9C90D
DCEA59
0B0E39
DA4169
43EBE0
F06AD8