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:

9E1DDC
3EDFEF
6EB4E6
868501
31A555
49F43E
0EA5EA
E78D81
28711C
4D26ED
E6A0F1
66433A
962A6B
A0A335
56015F
1C4E43
EC4D87
3D14AC
EBAE11
5FF0E4
59D29B
0DB1EC
469B94
539C58
9F2AF2
1F835C
0D410C
1D659C
EE5C14
6D21E4
94397C
C9EEE4
7AF5FD
5AE61E
46DC85
DBBB57
341861
FF8C49
C556BC
B16E5A
07D933
ADF974
F25825
2C4EA0
FC844D
5EC7B2
91618F
D87710
37C84E
61056D
557FD4
AB98FF
CE7370
23CD9A
1A796A
784107
B41CCC
9D28F9
224C86
F3FF64
4E0522
468299
2871A4
1B270E
7A9DDC
5C530A
14CB58
53B87F
C16EBD
7C544C
56485B
705861
9A317A
816ECF
04B3DA