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:

9C5FDF
B8C5F7
072666
469C6F
5BE443
345247
F51FDB
241D29
367F0F
992BCF
084173
70D007
290F30
9D943D
B80046
9CBDB1
1BF9B3
66AE94
EE1473
5240DF
6B36FD
86617C
600442
392DA4
60EA45
7AF410
FBBFE1
A10DE9
069DE9
0B3270
32623C
D8C31A
59123F
2C9C1E
B06860
8058E2
3D8EE5
C3C6CD
982343
8EAEA5
9256F9
C474F4
96F859
46DCA9
D95B4F
B0513A
575C7A
391C6D
5E9533
2C56E3
023226
D61AE0
FCB094
470DE8
69F2F1
596FE4
A9172F
4B2EAA
73E675
53A057
F8AA4E
2C0350
36BAC7
667A79
EC650F
CE8B1F
0EB51A
5A59EF
67AFB0
51643A
612FF6
6AAE4A
29F2EA
96605C
5B2E5B
914616
6A10C1
66DE34
2AAF9B
679C52
8F2DB8
9AF0D1
946845
A06681
2C848F
214207
D76E8F
C09B5A
2C3D09
19A49E
AB9F85
4B5511
717873
869573
2BA8F5
69F5E0
BF06BE
3F9C55
AA9557
7AB4F4