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:

034CA8
A98300
76F6DD
DD6C03
71765C
4290A4
17806E
80F3D2
0F7EB6
36A989
CDAFCA
FF6759
271199
6DDC63
AC15D9
AC9B5F
E1A7D1
612A9D
0946E9
F5CCA8
5B89CC
439C2B
15FA03
46FD85
358E36
573EFF
3A426F
11AF32
50A1AF
4F9D0C
6A62A6
9365F0
44EAF2
4396A6
D2453C
700CEB
34D19A
EFF919
5DFE73
45A4C2
99847B
830853
0D59B1
F4F410
BF6B1A
D9D45A
B82D59
79A03B
52D69E
2BC8E0
29751A
3BCC1B
1AE8E8
E2CFE5
D5B98F
C0F7C2
E86A5D
3240B5
2C4FB5
FCF085
B8462C
5A277C
78BE7A
273F72
A097BA
78032D
45442B
55EA78
F6850D
B7E532
8A457B
33F5E5
A5C81C
C59C93
B8F14F
1F3C15
248BB5
0F8A6B
DBFBDD
C557A5
B811C2
C27F86
2C8EE6
2FFE64
AEABAE
C6D50B
BC0280
FD7F0C
246DA7
488127
5E9438
17317E