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:

164526
EB90F9
E96C48
D0E574
9A1FA5
F562C2
AE10C1
DE5F27
3D0E81
CDCD56
098A83
AC929C
1B5960
11B2EA
951FA5
B3F1E4
3948AA
7FEBE0
663663
68E913
C614EF
584E08
EB41E3
DD6E53
62074F
90645D
0A5401
6EEA21
185995
A13573
17CB7A
8C29D1
8E8DBC
8AB607
48D567
BC54DF
50C38F