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:

1C5328
10DFC7
B3422E
E22BF4
E5B08A
06BE18
0D80FC
79EB36
0E0D13
4FACD5
324F06
30BCEF
C422EC
19F775
33B0E0
570A3B
7713D4
14C4A5
9F450B
9DEAE1
3EF546
7198D4
47893F
A5C100
069EB3
D3AA3D
549ECF
F1CE95
24AA78
4434F0
5369DA
FBF562
C269FD
8CDBBB
776831
3BFA3E
47487C
632FF9
5B2FC7
412D9E
74AD1A
F8753D
25C92D
94BDB1
D052D3
837612
9F5A05
AC1FC8
1919FA
E3576C
E5DE3C
09FDBF
A1D518
5F0DBF
300634
5E035F
C490EE
082173
040530
EC5FC7
A356E6
297296
B2C787
7A65E4
54419E
DA2CFC
F40835