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:

F845F9
A73537
72B3D1
BA3B8B
2304D2
8428FE
634D7F
593790
D06284
488237
B1D911
D7651C
4D2EBC
86D93D
7EC43E
892DA1
CD09E8
87D828
37FA7C
DD282E
3FA2B1
4B4C13
59926F
A6B2D7
D11126
BF63AF
9A9B36
B78461
33D6E5
0BC043
706BAE
440420
EDE60B
98D60F
3E9A72
5F7A93
8698DA
FAF8EE
F15150
A04A36
9854A2
A4B5EE
4E4ED4
95ABAE
A81C04
A55E8C
515D0F
C17363
8D4B5C
7C5DE8
E3C30E
F56B61
E1796D
DA043A
6FC644
A98136
5091AE
3DE600
EF852D
29C6A4
A9BE98
84FF92
F0C2FB
C46138
CDDC6B
B4BED3
7EF420
FB932B
989F05
E681A2
BAC049
A1B101
AED18E
25A090
5DB026
6B317E
813D06
5860FD
CFD0C8
06DB1C
4268B6
FA8D89
72BEBC
C29B5B
C24B21