def bw_silver(x, y):
    """
    Returns the Silverman bandwidth factor.

    Parameters
    ----------
    x : array_like
        Color from the CMD.
    y : array_like
        Magnitude.

    Returns
    -------
    bw : float
        Silverman's bandwidth factor.

    """

    d = 2
    n = len(x)

    bw = (n * (d + 2) / 4) ** (-1 / (d + 4))

    return bw