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:

53770F
BD573B
F3F8FB
D864F6
88B218
3BB527
823180
12064E
190BEF
0F8906
BE50C3
D01E53
9792D8
5FC826
9943F6
99FB96
8256E4
715336
20D17C
228C55
6D1D52
9DB2FE
671CBD
BD0D2F
4DACBB
73935D
D4E266
25905C
9880BC
727554
7798A7
6C9F0B
E8BBE9
72F2D3
2D8F52
20C86C
D1D6AF
29E947
FED0AE
E9B08B
AE26B2
9E8533
4E5C3F
AC7C55
C097B6
C3042C
0D9514
58A3A9
C9C05E
E72668
9F7697
DCC8AA
AAB631
45FD19
CA9A45
66EA6F
43B9D3
40AD5C
B1ED9E
FF965D