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:

199271
C6D368
BCDE67
E01982
8C9529
0292B3
D95796
5D7BA5
E67466
0982D9
02CFC8
CA10B2
06B053
CDDB71
8A73B8
72996A
5BC69D
6F17DB
BFC78B
B93C32
DE3E64
8691B2
ED669B
ABDD66
86D0E5
C2BE3C
CA346A
0AA683
FD4D92
0ADAF1
DA1C25
F35928
D0819B
39FBA6
566042
097A1E
3598FD
80C3FA
FDFF59
B3875A
D038C9
1C3264
F96EED
2CA501
58FD34
8FD9D5
EF77FA
CF3658
70556F
5F480F
A250CC
95FE49
F7519D
55067C
963E18
09A4F4
71FF97
229FA4
FA930D
1B4778
A9D987
3CFE45
8DF353