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:

BF5797
063D7C
BD928D
6DC199
610960
C0E32E
87EC9B
FF5A20
BE9E04
201686
D70226
17BF44
D1A76F
A2C871
9DFA08
042E3D
9735F3
887E6B
9806A4
903078
5AEA71
422BF2
D4D69F
792CBB
DA853B
38997D
993379
C918EA
D428D1
FADD91
419A7A
98DCB1
1C1011
F1B7F0
4C9F16
8E6ACE
106B75
3F106C
DCA86C
1DDB6E
1E66D2
8BBD16
5EA9F3
C14033
490D12
713A10
0377DA
4C169D
2F6430
AA2505
D7D15A
1BE70F
6D1DE0
EE7176
4D854E
A2D67F
F4DBBC