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:

6C7347
65F6B2
A37021
91B29D
EAFF0A
8980C0
8B672A
8B05CA
8D1BEE
8ED9A1
86BBBC
549FCC
0C6FD5
71BF24
500580
8EAA9C
EFE3EA
470D4B
54FD78
59104A
526C6E
1D4382
63A54B
D496BB
6B31F0
257308
A6A629
D73B79
5333B0
43D428
6140A7
9B8363
5327C7
7D2FAC
342AF2
71FF2F
059BF1
819247
2FFDFE
D5B122
1B742D
B8382E
C66004
982224
CE8BFD
0BF2A3
4F2026
FA7C92
736972
29C61D
30D774
8A3245
A603B7
A86296
1D5102
F00BE8
55ADEA
9B807D
C815F3
2885FC
67D627
23E4C1
EF7A26
B5AFF0
4E9922
92021E
169665
989C01
864142
8449C9
AF17EC
8E6238
816D75
85A791
E8F072
CF0539
4E0DBC
ACF4A3
FD5B3C
62D711
462C2B
8D4B75
526A50
D2BAB6
C65913
45D397
5FCBCA
6EFB17
9DCF67
B913D4
D07A71
8D5C64
B9D7E5
2FDC54
808AA6
7277CD
06D727