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:

868830
94A31D
CB5FF7
C945B8
F47639
A41AF2
262089
5A76EC
3A4946
375E6D
BE77BE
9F79BE
E52F3B
855CF2
40BF86
7230E5
856DDE
2E7A79
608A62
A6C7A7
2CA322
F2A4CF
8569E9
6FC3E7
67C190
34AC5A
ABA16D
079A72
CDEC62
D4125C
AC400D
3C4963
5586BC
036DBB
62C10D
E611D0
2A6555
413459
A647C9
B695B5
55BDB5
28C239
8A9938
6F0C39
F87948
AF042C
B5A85A
9E1DC2
9F9BFF
F40EDE
AEA77F
C3CD1E
0DAF91
D756C4
73B3CE
CC7CC0
36103A
40C7B9
11F5BA
521458
00A60C
C3F0F4
BF0321
AC7FBA
4626A1
01E7BF
F4E9B6
318FAD
AFC48F
A5B718
214059
938993
16F082