\startuseMPgraphic{tableborders}
draw leftboundary OverlayBox withpen pensquare scaled \frameddimension{leftrulethickness};
draw rightboundary OverlayBox withpen pensquare scaled \frameddimension{rightrulethickness};
draw topboundary OverlayBox withpen pensquare scaled \frameddimension{toprulethickness};
draw bottomboundary OverlayBox withpen pensquare scaled \frameddimension{bottomrulethickness};
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[tableborders][\useMPgraphic{tableborders}]

\setupTABLE
  [background={color,tableborders},
   frame=off,
   leftrulethickness=\framedparameter{rulethickness},
   rightrulethickness=\framedparameter{rulethickness},
   toprulethickness=\framedparameter{rulethickness},
   bottomrulethickness=\framedparameter{rulethickness}]

\starttext
\setupTABLE[row][odd][background={color,tableborders},backgroundcolor=lightgray]
\setupTABLE[row][first][background={color,tableborders},backgroundcolor=gray,bottomrulethickness=2pt]
\setupTABLE[row][last][background={color,tableborders},toprulethickness=2pt,bottomrulethickness=2pt]
\setupTABLE[first][last][background={color,tableborders},leftrulethickness=2pt]
\setupTABLE[last][last][background={color,tableborders},rightrulethickness=2pt]

\bTABLE
\bTR
\bTD 1One \eTD
\bTD 1Two \eTD
\bTD 1Three \eTD
\eTR
\bTR
\bTD 2One \eTD
\bTD 2Two \eTD
\bTD 2Three \eTD
\eTR
\bTR
\bTD 3One \eTD
\bTD 3Two \eTD
\bTD 3Three \eTD
\eTR
\bTR
\bTD 4One \eTD
\bTD 4Two \eTD
\bTD 4Three \eTD
\eTR
\bTR
\bTD 5One \eTD
\bTD 5Two \eTD
\bTD 5Three \eTD
\eTR
\bTR
\bTD 5One \eTD
\bTD 5Two \eTD
\bTD 5Three \eTD
\eTR
\bTR
\bTD 6One \eTD
\bTD 6Two \eTD
\bTD 6Three \eTD
\eTR
\bTR
\bTD 7One \eTD
\bTD 7Two \eTD
\bTD 7Three \eTD
\eTR
\eTABLE
\stoptext
