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:

EB06D1
FAA0D1
69420D
2ED77F
E6F9EE
2ADB33
B627FE
560DA3
F0C98E
EFD3F6
F4EAD5
872227
BFE863
9080F1
B0341C
2EC024
C49F16
3F470F
EFF4DE
EBDF1D
145EBC
24AC80
A3E18F
9DA2B3
45DAE0
DAF25C
FCE574
BC555B
87D246
0C4C6E
FFA121
79104D
5708B4
B0D7C2
28ECD8
4B9539
21E854
9E7CD7
BF3C1A
2BE8DA
E70EEC
AACC7F
82FE3E
0D9ECE
3B8999
704846
8F46C9
326689
FD7FB1
993C9E
CFE32F
A5CBB3
A1F4CB
B1C429
004B36
5BB6F1
E6A866
9C20C2
09C3A7