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:

ED2F7A
8AC1F1
89A5CD
F9C0FF
2D6436
654564
C7DF74
BD8D7F
4687AB
1C4528
8BBFF2
368B6D
022220
B61CBA
D764EC
D03F8F
DFDBBE
DE3876
F1EC28
76C76D
E299DF
3F2471
547AA6
4F0F17
2B6EE8
CB1262
9A9203
0479AF
04E968
B7A23D
EBDDFF
4A8E7F
E3BDA8
4C9ED6
BD792A
BDB91E
D0361D
026A1B
938F3C
D9AC74
2632A0
56B368
EBE7F2
644140
C635B3
537C49
BD9963
326216
070A92
464210
1A1295
6DBEFA
53813C
28B18F
51F80D
83B92A
1FD260
263E68
888E92
2672C1
DDE5A5
585A14
9F4208
6DF7E0
A90148