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:

107493
7437C9
46B090
DA6E94
9E887B
D344F7
D7B9ED
1661C5
BF61FB
6BCE92
C8B693
45629B
2EB02B
CB7799
BB5E21
640D80
03888C
208D34
10018C
7DA236
6C2DB5
ABA402
E462A6
D28475
0E4D1F
A0615D
834C4A
7810BB
42E742
CC178D
C57D21
38A962
BDCD3B
083888
3BE060
E73F22
1CE8DC
DE708E
F40188
4BA6CD
AE63C7
A9B639
A50EA1
D22270
AE1C8C
32669B
B18ACF
DCD81D
40F95A
4FCA06
5ADA39
918E39
CBD432
5DA7AC
BA2E03
546977
4642AE
4DC9B7
A12D1E
1E0F26
625923
180016
F7763B
4F3CF4
472F0D
EBED16
FCE288
1883A1
9CC19A
0E21DA
BD8EDF
5056FF
3B49E4
8C5C6C
E351F9
3745A3
541C1D
6A8291
4E1442
7A56D4
EA996A
EAE90C
4F06DE
1E2F72
4098E8
9640C8