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:

EF8230
A6B6E0
E366E4
2DE96C
B7EA60
412F20
5FE89A
B54550
B2C9DD
75B8A2
E62DC4
92AE6F
0D254D
E52162
2B5815
8C7E20
BEB103
A66249
D22A2C
34AB32
4EA76D
547B14
CA4785
712A05
7EC17F
CEFB30
8321D6
982351
D17C9D
679AAD
0724AA
277E26
E32945
BEF656
FE1DE2
4EFA68
886D39
54E9CA
35E7E1
93D7AA
515BB8
364A3B
720D42
C514D9
A38369
BB7CF9
E50336
663360
27A5BB
6B44C5
140B02
62256C
BEDB67
C382B3
7DBB4E
CF5B75
01F939