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:

0BEF59
DDA129
9283A6
4162AC
865553
F80B0A
4AEF62
BDE462
F93F66
C5E7A5
400606
A844FF
633051
B5E1A5
13A653
E8841E
3BE468
B2CAA7
02CACD
0A8315
1000B3
386876
D4D76B
9F9F5E
28CFD6
13A9C7
593712
D0977D
C37B92
58EF34
5ED6BD
B6C419
DEAC37
AA6F1C
53E963
46CE81
FEAFBE
C2B149
5D4E78
467A58
0EB25C
A045E4
28DBD5
267E84
E889F4
8191E3
B29475
17E52A
CD9C92
6455CC
54F941
4A143D
A98FF7
7C4EBB
6BC1C0
437960
538E11
2D9FDC
D1CA4B
F5F58B
87A3CD
9B6DBB
B9BEF7
CBEF20
F7D404
8EC948
2DE9AF
C88AFE
096B47
77A023
9C1EB8