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:

B099C4
3DD7C5
6CE293
9C3A43
DEE5D5
EA3923
D3B4CC
B3A116
D66220
386B21
6899DD
002FBB
A29C90
C54613
1165FF
DBD4AF
DE844A
148412
D25B66
D3B8AD
BCD8A7
6A19D3
D3337A
21A911
A73334
EE91E5
8A614C
4A2BD1
5C1905
FC498A
8FA603
2EF41C
BFFCB5
CE355C
9D0A2B
3ACAEC
675984
45BCBE
FE6948
167493
D2F580
238036
8CE312
37CB95
D23378
CDC8CF
CE3173
F5D9B8
083FB9
23B82A
E3C233
C043DA
3FF9A5
A04BE1
008CB0
92DE78
9385A2
D93FC2
6CEB4F
BF6583
1B6457
33E570
549941
DF74E9
5918F9
D8BF96
CC1912
AB1C6F
9A177E
E272DC
7BB6E4
FB50ED
16FA2F
B9680B
4EA3C0
B67602
AFFF0D
9806D1
D61B68
EF882C
5FD08E
FCBE60
3AAD08
4F09BA
64A493
835AEA
558BAC
DB585A
F74244
10DC1B
F20AB1
622668
589F45
A60623