I'm trying to get my PlotMarkers to appear in the Legend as they do on the plot. I've set up a function named square[], that makes a square with black edges. When apply this function in 'LegendMarkers' the edges appear gray in the Legend. Its really annoying? Any ideas on how to fix this? image and script are below.
square[in_, out_: Black, size_: 12] :=
Graphics[{in, EdgeForm[{AbsoluteThickness[1.5], out}], Rectangle[]},
PlotRangePadding -> 0, ImageSize -> size]
data = {{2, 4}, {3, 9}, {4, 16}, {5, 25}, {6, 36}}
legend = PointLegend[{Style["test", 18]} ,
LegendMarkers -> square[Red]];
ListPlot[data,
PlotMarkers -> {square[Red]},
PlotLegends -> Placed[legend, {.2, .7}]]