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:

6F97F6
B8C244
5FAEC5
1FE265
489840
01B111
830B61
8E6DCD
FFEF42
545B37
D37930
883169
AF092E
412552
10B5DE
F9C380
100E63
A63D5E
3812AF
AA2233
EDA019
7DC25D
585B5C
2DE562
E64C32
A86CC6
F307C4
6C3C58
80E89D
887C5D
CF4F63
2892A7
CB8E5C
C25A67
6CFA9A
FE70B9
918DC4
9958DF
2EA6FC
4BC207
F5A2C0
30B5D1
9BF64E
19BE2E
0E8ABC
61D6C3
3370C9
D5E595
4803A3
51B093
E7A077
742575
463C47
CE5DC0
CA53A3
7A9705
C6528E
2A6CEF
2B5298
5AF35E
C77495
58AD82
77C18A
F04CF4
519523