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:

D6D9E5
16FFA5
DCEA1A
200D1A
6080B0
23E796
F5C370
3398FD
5A8C80
4C3459
C0AE59
750D86
995A1E
922533
8BEBD2
C623B9
8EB364
A9BB63
66876D
EAA72A
B9F055
A77FE6
D308DC
89A582
531AE6
ACE4D2
53CABB
38BEDB
AC495F
0BCA33
5A0EF9
3F3A5C
FE8D88
C8EE58
5CD87F
0D1240
B45637
740541
8C4AAF
2D71FC
9EA9D5
A65519
1CC5B7
0DDC86
995461
A144B0
8E540F
7B3D48
7ECE71
92A437
1B7B51
D58F13
FB8C57
1C029C
699514
4A8209
10AFC5
63382A
22E6AB
000A85
5596A0
D64D36
16280A
1E0795
A8574C
B3C481
293042
3D553D
37C666
C48D8D
854001
BB591D
6AE015
478C61
19F134
7D698C
96672D
23AEDA
030550
73C920
8E7D59
FB2DAC
DB0105
8D6565
6D6158
75AB51
4B13A4
CEC927
820250
B1BEDA
6D139E
F1DB01
F62830
3AC7AE