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:

19C563
DAFA38
7A72FB
127CDF
50C68C
95F327
FFCFDB
3CF069
48FD02
5B652A
8C2353
C87A48
026FDE
131C31
D70890
2F25CC
3C644A
B6322E
9D4BE2
85D923
CD3802
892EBF
1C3D53
837036
123070
928EDA
C429ED
C93AA9
64185E
A3CB9F
D1FC2C
3E5E96
0536D9
090163
ACB155
6C4A06
75D14C
B8BF69
75DFC4
90360C
453EB9
92189E
BEE719
F0A743
9417E2
652CB1
487D91
A872A2
A9804B
790BCB
DAD77D
D21B55
1FA507
8C8FED
7E3ACC
067D64
B12515
B73C91
5799B5
5B60DC
3D5CC6
2852A2
C68CEB
7427E8