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:

DF566D
A6D935
1543DA
2AE50F
6DDF24
01594F
69B8CF
49180C
7CBA69
A5B6EC
C9C72E
B5B734
398C0E
85439F
13E48A
27D162
C4C4C3
82C56D
97FAF0
E54D17
76279F
69AC38
F0F468
064A55
1D3928
E7F0F2
C62A62
7A834F
08BBBE
DB1B66
AECDE8
E781C8
9841D2
29337F
DA2913
3B8CA7
D1AC2B
B7E690
C6E5A4
E85533
A93160
A7107B
01CBD8
7A35FC
E40671
54D0D9
45D9CC
B47AF9
E0F8F0
BD96E6
509AA6
85B003
5FABF4
553F07
C0B627
FB2A6C
29340A
1E53A5
E8B51C
EC40AE
23026B
907DDB
5D767E
1A6F5F
809EFB
8C2D5E
EB0EC6
A6E12C
2FCF00