def METHOD_NAME(m: Mesh2D, x: ndarray, **kwargs) -> SvgPlot:
    t = m.t
    minval = np.min(x)
    maxval = np.max(x)
    p, width, height, stroke = points_to_figure(m.p.copy(), kwargs)
    template = ("""<polygon points=""" +
                '"' + ("{},{} " * t.shape[0]) + '"' +
                """style="fill:rgb({}, {}, {});" />""")
    elems = ""
    for ix, e in enumerate(t.T):
        scalar = (x[e].mean() - minval) / (maxval - minval) * (len(COLORS) - 1)
        ix1 = int(np.floor(scalar))
        ix2 = int(np.ceil(scalar))
        color = (COLORS[ix2] - COLORS[ix1]) * (scalar - ix1) + COLORS[ix1]
        elems += template.format(*p[:, e].flatten(order='F'), *color)
    elems += draw_mesh2d(m, boundaries_only=True, color="black").svg
    return SvgPlot((
        """<svg xmlns="http://www.w3.org/2000/svg" version="1.1" """
        """width="{}" height="{}" shape-rendering="crispEdges">"""
        """{}"""
        """</svg>"""
    ).format(width + 30,
             height,
             elems))