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:

44A9C3
72186F
A2C84E
83F062
FFD1B8
542998
98D646
52C222
498FA5
F437FB
4DEB4C
B67A7D
97D28F
784172
10BF34
92B62B
6B2408
50DB5C
7F33FF
AE494B
D89A59
D8629C
1AE643
93E16D
D8D3D4
43C781
FBF2E3
B418ED
FB8830
C0CBEE
88AAAB
488816
DB33A7
8C20A8
ED295F
2E22E5
303700
116962
4E4D75
F539A0
4330D8
E06378
6B23F3
FD1EBB
070BB1
0D6BDF
07DE3E
8453EC
3138D6
B36043
C36C6F
160FB7
6B262E
AA58CB
CB5FDD
0385BD
16A0EA
E5CF71
E3E3C4
C52298
3AD8B6
0DBACF
016C0E
9C855E
9CD473
06E030
502DDF
330D8C
1B65B3
8262CD
A27464
C678CE
BA3714
0D552F
C1B942
A113EF
217A1C
21EFD0
464F73
30B165
6C4189
316DA1
C166C2
8373FF
D5194E
575165
949AF8
E5B379