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:

C64A0F
2C19B2
E1D451
7B8F9B
794DAA
A21C39
54F1C3
D34B65
F833A7
174040
F617E8
78A2C8
B0BEEC
2C4710
AA5E4E
6CB816
099EFC
87B9FF
F8554A
E508B3
28CAA2
5CA85B
F39BD4
EF7B9E
C58B4F
1C0F70
2036E5
0FA94D
85B83C
AAE250
9DEDFA
207BC7
AFE9B7
40AA6E
72D6FF
D4B209
6EBA94
4FB0DC
47DB6B
0D5D4C
0D6661
E09658
DBF089
C8486F
BE4C9E
78474A
09B0BF
ADFEA2
83D365
D2E213
5CB6CB
602415
B148F2
709C7D
81DF67
10DF85
16A847
F8B84C
74DF53
106C56
DFCFF0
58A279
8BFD84
4D3ECF
BDA924
CA72E7
DC61FD
7A6983
0715F7
691678
1CD917
54A12B
6D0C31
03067E
47276D
51141F
B40995
231559
EE3174
425C3D
ED64FE
3286B9
9D4485
715DA1
1A82B6
02A284
A84688
79E3EF
437655
D2E064
EE6B67
2DE60E
17E335
F68AA9
474053
765D3B
0877C1
747ED5
5C2D76
A45F50