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:

910151
A230AA
32D440
26A858
E64379
1102A6
5080A7
75737D
B13A38
4A05B6
33DEF4
C3185F
156C10
E8EDEC
4A1DCA
C886F0
144061
5C2F0F
9AA12D
5B683A
F55B94
EB4305
E928EE
AB214C
17962E
018482
69E9FF
944F5B
F5907A
BB1FDE
50ABEE
124788
7FD9B0
660D36
C5ED08
DF8104
E1D614
14795B
DA083B
32B4DC
021C5C
56DE6A
F40EB0
F24FDC
EA398A
80FD48
25C68B
A758C3
C0BDC9
C13671
52A6C3
BBE326
04324D
27EC54
ECB798
AA4C5C
3E1913
F402F2
C704AD
F7A445
963AD7
131688
C3C398
90CB5C
413ED2
FD1210
464615
6ED554
6C1EA7
AFBA34
C05DCA
AEC713
234C4A
305A90
B78E8B
F0A10A
35B638
6DDD09
733BD4
10B5B9
43D113
FFF621
0590E9
FD670C
B91BAC
8DEA8F
FFCF77
5F41CF
ADE22C
C2C0C3
8DE20C