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:

B89993
80BD90
D7BFD9
C257ED
D218B1
65993E
764C84
F2B697
A00B8D
B19CCC
5F83FF
3B309B
769C09
5AF811
FF45A2
091556
6C0A69
B2AD0D
A610A5
E587A1
1A555B
CA515D
DBBA08
F449E2
60D7CC
A0A753
3D3B28
64DE28
4F1B56
A7BC14
F6212E
5C261B
FEEF11
3E8668
2D11A4
79D1DF
F83EC2
DEC9D1
5E621C
0CA9AC
B68991
2D721C
27AA1D
71ABB8
E55A99
1274AE
1D0AC4
043FEA
682BFE
FC9C0E
CB8D34
CD302D
E88DFA
2A9127
A4CC46
CA65FC
E61204
9D65D4
0353D3
287D13
741A72
711DA6
FCDACC
BB5654
0FB63D
778F1F
3C21A0
FBB39D
BA0FED
F74A6F
911C54
2ABAA1