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:

210B8A
7E7DE8
333894
CDEFB1
31F5AD
D6E0DC
2FA9D6
7412A1
DC90EA
F9421B
EE0D00
547AE1
A0FFBD
FFCDF6
D70D95
A0D999
549879
BA83F3
C39890
E7C1EC
118BDA
000D45
B0B8EE
024B50
5EF09F
D1C8C8
72205E
06E9C1
315B22
3C5BA4
D9FC0A
127278
0389B5
080E6D
62AE87
F348F6
46FA23
499E50
38DB1C
C4E5D4
E6C88C
E04A2E
BAB3DD
6A30A3
985278
C535CF
1C55FE
43F3A8
A2AD89
10000D
9AA0BB
122F8D
603CBD
90054D
938BBF
B4C67D
3A7CB6
A321B4
03D9C9
FB04DF
E1AFC7
38895B
5BD975
EFEEB9
476249
35DB3A
8CB1C6
A9980F
D0BB6D
E06C0F
2D51B9
615C5B
0C7A79
347851
BA3BB4
191950
DA2192
354D3B
00E6EB
C94E53
93F66D
66FC81
96C658
CB7676
86ECCE
69FF11
8176E5
6E2D8E
8D44E9
974721