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:

8D2B66
2A1A85
DF7760
3DD008
0D33A2
9E3004
6C84EB
AB6C98
511190
764AB3
BEA5B1
2FC5E5
05BCE5
1FB41D
A54D7B
8FA0F3
779E9B
6705AE
2D7D09
84B4B3
37D614
7E8C37
259BCB
E4D197
AC0EEE
058A7A
1C491B
B22C6E
05E649
955CD4
C74FAC
CE08EA
D09943
D10A57
BF8085
8EDF7E
624A0A
5AC878
859BAF
6BAA6B
79E6B4
867B91
C396D0