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:

9A4599
CFEC3D
ED7A19
DF768D
F68008
9FF803
A4C2DA
2978DE
8CF05B
99F53D
AC3EB5
207E48
4B3720
BE0A80
547DD2
5F88AE
BB45CA
0F5DEC
29646D
67043C
A8D528
97F7CC
A67C70
29189C
7E577F
F2F2D4
321102
FA4C8F
F22F73
B9501D
0A63DC
0EEF3E
9B6123
476C58
DD9A18
33932C
B9AC84
B47977
65ABD6
D70BB4
8DD28B
C1153B
3E13DE
C3C800
92E5B9
19640E
B43896
4296FF
BE2E09
B12E40
930FA3
2C5992
135C8E
9756D5
EB4C72
8DAC63
EB966C
340215
F5A079
066AB1
11386E
156ECA
0E9718
043EE8
6DBC19
F11C0B
351A8F
A2C86C
1D0648
45D5A3
9A6412
6D46B6
34A36C
1360B9
EFCED0
34D387
97DE1E
0387D6
231B0B
DE5B8E
B173F2
8DB96E
49B8EE
2134C9
A486C1