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:

4C9949
D3016E
0C3FB2
F26A8B
9FEBC6
112C2F
0FFFB6
CAADB3
B0C71D
4FF596
BAAB12
BB84C6
05CFAB
C73C0C
4FAA03
86D446
4922ED
B8CB41
F47A94
16D7BE
4EDDEA
154A63
AD014D
BE4734
C722FC
289E5E
8ADC82
E848BA
462D2F
8AADCC
729AA7
D862FB
DA814F
D76633
21FC79
498B68
512EB1
79DF60
C24F00
20E6A1
735B8C
A8A739
4557E5
95E76C
7F4543
0D3D60
C8B103
31E0B4
0B12FB
86E600
672AD8
CCF7D4
12E719
4EC94B
583A17
A92AB0
96F04C
FF92DC
37D0B2
7BDDD6
297242
E9C578
55E1DB
2455DF
CE908B