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:

FB105B
FD7FA8
344741
F4C993
6717CE
50295D
AC5912
5D2B9C
7E837A
0C6EA0
8B97EA
490B03
D3DCE6
CA2056
69F69C
5CC87A
C450B2
76F8C0
70418D
CC4CF0
ABEC5F
5FF793
DDAD39
81F765
E43821
A84F42
256EF3
A7FEBD
CF6A36
4EBA82
405D27
7D1244
2DEE2D
14AB83
D12163
E2C43C
DDD684
6D2631
A76E51
4169B4
1924FF
AC58E0
9FF04E
982FBF
8AE8BE
DEAA83
F3290A
1A4B6B
45F1FD
069B75
98A71F
888366
274B05
B50CDF
CCF5DA
74DF50
501D8D
8F0FEB
BF339E
3EE07F
F47123
D34BC6
F5DCAE
8B4580
98F50F
6A8A23
3391DE
9A21D6
CD355D
3922DE
C6EA6E
9159B4
8456F6
D94FA1
E378E3