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:

C14DD1
EB25D0
57C92D
AD60EC
1A3C18
E5CD1D
1709E5
D8CDE1
540714
FAC11D
842AC0
E05F74
8C99B1
D67051
88BFF5
7B08EA
BC1052
C7DAFA
A949A4
C1DD9A
2632AC
45EB03
B2FFD2
27A17D
E94A80
69374E
79BCE4
85F342
EA03B3
F47CA1
AFF4B7
2A7218
8B5E19
64FB68
65D597
EC77FB
564AF9
2C8836
7C7FCA
F963F2
942D39
6B14AA
51D1CF
0B31A4
A307DD
F93A0E
3D9815
59E6DA
AB3BFB
E8041C
9FF981
907A12
DE9A0A
FFA874
AF49FA
0E2155
866D3B
D3A86A
0C16CB
524736
4F656C
DC4665
7732EB
DCB7C6
4C8F5C
D5681D
DF9B0F
114D15
B59182
945B09
49B42F
54D1DB
C66E22
589F7A