def _make_diamond_gradient(X, Y, angle):
    """Generates index map for diamond gradients."""
    import numpy as np
    theta = np.radians(angle % 360)
    Z = np.abs(np.cos(theta) * X - np.sin(theta) * Y) + np.abs(np.sin(theta
        ) * X + np.cos(theta) * Y)
    return Z
