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:

626AA9
4FC74F
B85019
434F1C
FFA382
6C3685
35C759
9490F1
F2A7B7
A6DC3A
9AA2D4
032128
B27C4C
4198B5
77D486
E900F4
10405B
D7196E
40086B
09968F
2C122A
3114E9
CFF747
F33DDD
0E49BD
C36989
917CB4
18135F
93C8B0
689210
00D861
FF6CC8
86ECA2
980B93
2F7058
775FA0
456069
F7DC97
190810
C4B06F
7204DF
B58332
BF0F2F
49C392
1DEBDC
38F8FA
1CED00
A025BE
7AB466
9E0ED6
50374C
DAD1CD
0A68B5
C49CC3
D5B2D2
8CDD5F
E56E33
4771ED
42E467
F8EF3D
74988A
0048D0
5BF798
642E76
E928F3
B1E44D
80F6DE
737C59
D828C3
64A84B
5E0309
52B826
505942
38CE15
529CCE
B251E8
88140F
F66124
5C59B5
80E4BC
02F808
7CB7A0
E240C6
114437
D98B2A