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:

988291
092F35
7A63E6
E6FB1C
9246A9
CA38E8
F9A03D
AAD154
2E6160
4C8791
089B6D
277D32
DB15D4
A81383
86631C
B1D7BF
730EE8
8F3F38
15824F
ACAD87
1883EB
A00034
4DA431
1170D8
A8C8B7
886489
F89195
A6B8F8
C7677F
C898BD
BA93C6
342BEF
FE977F
AD6BEA
4C3403
E58190
57E483
AC02F6
C2CB35
2C464C
EE869E
71173E
57E230
188A09
D9EA9C
E416E0
9B9037
6BC3AA
26B4FA
C3226D
5F2E9F
1E644E
A2145F
4CD4C8
164F0A
564F04
3D0001
8FBDA0
BF16EA
76D5DF
69BD51
73BFCD
4182D9
ED8109
FC0E64
A7A60A
BB9911
F7F228
ED29DB
E585FC
1195C9
A21C09
F64623
11A303
BE91FF
84E925
BEB0EF
3E95B5
3C0883
5F28CE
12B27F
F4C142