Why isn't my script instantiating my prefabs?

I have a level generating script that generates levels based on the colour values of an image’s pixels, however it won’t actually instantiate my prefabs! What is wrong with it?

public Texture2D map;
public colorToPrefab [] colorMappings;

void Start () 
{
	generateLevel ();
}

void generateLevel () 
{
	for(int x = 0; x < map.width; x++)
	{
		for(int y = 0; y < map.height; y++)
		{
			generateTile(x, y);
		}
	}
}

void generateTile (int x, int y)
{
	Color pixelColor = map.GetPixel (x, y);

	if (pixelColor.a == 0) 
	{
		return;
	}

	foreach (colorToPrefab colorMapping in colorMappings) 
	{
		Vector2 position = new Vector2 (x, y);

		if(colorMapping.color.Equals(pixelColor))
			{
                Instantiate(colorMapping.prefab, position, Quaternion.identity, transform);
			}
	}
}


137598-screen-shot-2019-05-05-at-51329-pm.png

It looks like the colors you entered in the editor has no alpha, and since you filter away all the pixels from the map where alpha is zero - there will never be a match?

Also, you may want to move the position variable outside the loop since you only need to initialize it once.