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:

2F33AE
B2D98F
9698D9
73A3D8
7150DB
4B8F7C
B42FC6
07498C
C89504
3E7CEF
A6E99F
C85155
4D0360
DDC51C
E05A92
ED2F60
080D8C
3C0BA4
F3F47D
D5229A
A8BA50
5D5372
F64838
CBDAC8
2DADA7
05CD3E
7FCB90
7367D8
C49780
5B0BC7
02F780
48C1F4
C520D6
E741E8
310FBC
0F7211
AD360B
61C372
BECEAB
8F4033
B971B3
CD3DD1
A56F61
3D19FD
947AFD
7A21B6
A61552
5CA27A
66FE50
67FF1A
281561
C95285
1BF06E
E4BA91
A0B39E
63E492
8B1570
41022E
08B197
DA82C0