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:

04B762
17A833
9245D1
F8E6F1
E8AA3E
31CCFE
646856
28A9A1
229B03
7340EC
A194A6
19AF2D
CFC8F0
18C583
BBBC38
B493B1
BF05F7
D8F6BD
89986B
D18E34
076A3F
DBA694
623B5F
E53E5B
E653F2
EF0F86
ED9AD9
413CA4
4A1A5E
B5E89D
408DA3
0DC6EA
C45D02
5B4C9E
FACAFF
C6EC8B
5D6482
C576B7
E78A5E
30C8A0
0E4F68
AF6C83
4E50B9
4884E7
164A38
22530C
98F740
809E9A
AC14BC
D419C2
598D2D
D9D365
3272E3
018A46
E1CEF0
AFB3BF
7769C2
6766DB
C32EDC
076B96
B3B462
6D0222
D6CC25
B0B392
6EA0C3
06D1B1
8EEDCC
54F015
EA6C55
4572B1
985B6F
67731E
9C8983
A2F991
C86B44
57F362
FA9F15
DBED9C
4BECD7
D236E6
391986
62D8FA
C67897
BDCB5C
1BEE2A
D79EF7
C9FCA1
2AFD3E
FFC968
BC5A39