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:

32927B
00B4F5
B110D0
F79F86
5B4DB3
0CE1C5
D687BF
7FF9F7
54C1E3
2F07FD
408F0F
E5F25D
948CEB
4C6A49
704C99
162885
312ECF
F92964
6B5C06
06F14D
CC0A86
9E0714
993BCF
CFEF86
478191
883C4D
9A1067
571779
317FDA
8B34F1
A2150A
599F86
98B5BE
B4357D
008947
78C3ED
D0DACD
99A386
C95B2D
0A3768
BAD914
A86463
503B6C
D3031B
D1DE6E
90957E
3D09AA
4CA294
B695C1
641F8D
262025
E92AD3
506D4B
E972D5
0CE7FF
5E328C
433687
067081
3D9428
E8B16B
395169
EF4D5F
582387
0C072D
5685B2
409984
012602
195274
DFF06C
91AA8A
0D8D13
946CA1
620C8F
AB1D72
1A52C9
F47927
1FF80A
D17394
1EBA2F
B55E2F
0F1093
DED224
E5A3E3
15EC73
689D37
E97A4F
76DA3E
7BE67E
9F756C
4CDC85
A34E05
C51A1F
DBA72D
319362
48BB97
C40A00
3B1D57