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:

D43884
82EE2C
0EC9C8
394457
252F4C
FA8562
4D84AB
2DBBAD
949BCD
6F0149
0BC058
0CD190
7F5CEF
310A1D
F9C10E
A49CDA
EEB5BC
B32FD6
24DE0F
B4A072
622C45
34C146
7ABC41
B83798
4C771A
680E60
F7C995
D2400A
07D69E
4331D2
365FF6
324AE3
0BD327
355031
47A026
5862FE
A8649A
537B6A
198B6C
2D534D
7ECC42
0F359D
A71EC2
8A8067
DFBCB8
D80423
49ED6F
372E45
BC154D
FCE96C
8E60B8
20BAC6
DE464E
B212C3
EABDC4
13736E
C46817
A5993C
A6BE3D
2BE028
E1A60A
6D9EDB
B66F3C
103165
107376
9A641E
2D28DF
16D0FE
753CA7
576F3B
2C99A7
12998D
46082E
ED44D7
C2734C
58A311
D3FD67
76A06A
C8CBD4
9DA9FB
FCFF5D
CD0341
DDBF98
7D6305
A0E0B9
E0306D
284B3D