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:

9143CE
C579B1
4E3B62
0C9B51
C5BCF2
224060
F442CC
C0E75D
736AF9
4B80A8
7B9667
5E2EF8
41A892
F54C51
F98F38
5E9FC8
14E1C5
59CB99
3A2B2B
1AC9C6
B8C017
2013E7
58D418
0A1E1E
B220A3
5BF518
7DFB41
268328
9321AA
A0C171
522410
E9536D
0933E8
AE1245
658E7A
AD58EE
A76C04
4EFB6C
F286C8
F0948C
FC0544
056914
095E9D
647BDB
903B57
F86BE8
F92A5A
5067A6
9D6E35
48FCAF
011177
D5F722
CFD0FB
1869EE
ED6B2E
7746AE