If I understand correctly, you'd like to be able to enter some 2D integer indices and return the Polygon on a hexagonal grid? Using HextileBins
to do this is interesting (and in-fact there's a similar example of making hexagonal grids under Applications
in the Resource Function's documentation).
Your code above can be massaged into achieving this, for example something like this:
xBins=8;
yBins=8;
xBinsPadded=Floor[2 Sqrt[3]/3 xBins];
hexes=Join@@@(Transpose/@Partition[GatherBy[
SortBy[Keys[ResourceFunction["HextileBins"][Flatten[Table[{x,y},{x,xBinsPadded},{y,yBins}],1],2Sqrt[3]/3]],Mean@*PolygonCoordinates],
First@*Mean@*PolygonCoordinates],2]);
Graphics[{Red,hexes[[7]],Green,hexes[[7,3]],EdgeForm[Blue],FaceForm[None],hexes}]

However, the main problem is that the hexagonal grid does not live on the cartesian grid, but rather uses hexagonal lattice vectors.
This is perhaps a more 'rigorous' way of achieving what you want:
- First, define the hexagonal vectors
hexagonalLatticeVectors = {{1/2, Sqrt[3]/2}, {1/2, -Sqrt[3]/2}};
- Then, we write a simple function to return a Polygon at a particular Cartesian location
hexagonAt[{x_, y_}] := Polygon[CirclePoints[{x, y}, {Sqrt[3]/3, \[Pi]/6}, 6]]
- We can then loop over integer linear combinations of these lattice vectors to obtain a 2D hexagonal grid (note these are indexed using the hexagonal lattice vectors)
newHexes=Table[hexagonAt[{i,j}.hexagonalLatticeVectors],{i,8},{j,8}];
Graphics[{Red,newHexes[[7]],Green,newHexes[[7,2]],EdgeForm[Blue],FaceForm[None],Flatten[newHexes]}]
