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:

C1220A
19DB94
B2944D
882044
019B8D
AEDBFA
98C545
69E0AE
A85FE3
5540AD
A276E3
AD38C9
BFC1B9
CAAB94
332CD9
24F078
AF7C69
0ED6FB
F9DF66
F5F7A8
3EE9AF
30EFA8
7FAEE3
FCBCCC
0721B3
0ACA6D
C56396
34ADA4
71F148
84EAC8
ADC3D1
E0444B
2AE602
CBD3B8
126112
73D739
33E68B
93B9E5
9A5793
368709
7C9E35
3EB6C0
6564AC
F49529
819C45
8416ED
8AF8A1
2CFF80
BA683D
2B872F
45C4F6
16133C
29B943
2082AF
0CF08F
15AA87
689BC6
EBA90B
6C9CD8
1D2B4A
7BF3DF
BE7C31
C28B5E
EF2B4C
2491C3
A10F34
708EDF
E88211
3F4D8A