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:

4EC3D8
AC3F09
6C3C4A
E2E56C
DA7135
207D8A
5854EB
59E0E7
7496DA
0D7AA9
07E0E6
2C7DBA
2238D8
EC7006
626727
9D73A2
7C4D25
A09A9C
E94FF1
70D0DA
88D5FC
3D3453
6E164C
C7DD41
C2A69F
8F8C9D
DCCF7A
A07D8B
735486
1F33B5
397F6C
C64980
8752FC
9AECE4
308480
78C42B
EA8FAE
07E86D
6E7AA2
54A590
C55E46
CA1B21
57632B
88F443
BCE5D5
E54636
39B313
798B5F
2176C4
5BCE3B
EA8DE0
7FAFC2
FC242F
234F80
318932
C7F5FF
27C03B
71C0DD
C95C6B
72B142
A0C929
48EAD2
B4FDA3
F8B24B
905F48
23497B
363EAF
47FDEA
290790
9DDACF
E823EF
80E361
D7695E
A0A874
160D38
2C3613
F7D997
7F5560
883D26