for i in ipairs(colors) do
	local name = colors[i][1]

	if name ~= "white" and name ~= "black" then
		register_ore({
			ore_type = "scatter",
			ore = mymodname .. name .. "_light",
			wherein = mymodname .. name,
			clust_scarcity = 8 * 8 * 8,
			clust_num_ores = 16,
			clust_size = 16,
			y_max = 31000,
			y_min = -127,
		})

		register_ore({
			ore_type = "scatter",
			ore = mymodname .. name .. "_dark",
			wherein = mymodname .. name,
			clust_scarcity = 8 * 8 * 8,
			clust_num_ores = 16,
			clust_size = 16,
			y_max = 31000,
			y_min = -127,
		})
	end
	register_ore({
		ore_type = "scatter",
		ore = mymodname .. name .. "_diamond",
		wherein = { mymodname .. "gray", mymodname .. "gray_light", mymodname .. "gray_dark", mymodname .. "black" },
		clust_scarcity = 7 * 7 * 7,
		clust_num_ores = 5,
		clust_size = 3,
		y_max = -10,
		y_min = -31000,
		biomes = { "underground2", "underground" },
	})
	--[[
			minetest.register_ore({
			ore_type       = "scatter",
			ore            = mymodname .. name .. "_glass",
			wherein        = {mymodname .. "gray",mymodname .. "gray_light",mymodname .. "gray_dark", mymodname .. "black"},
			clust_scarcity = 7 * 7 * 7,
			clust_num_ores = 5,
			clust_size     = 3,
			y_max          = 64,
			y_min          = -31000,
		})
		]]
end

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "gray",
	wherein = mymodname .. "black",
	mymodname .. "white",
	clust_scarcity = 8 * 8 * 8,
	clust_num_ores = 16,
	clust_size = 16,
	y_max = 31000,
	y_min = -31000,
	--biomes 	       = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "gray_dark",
	wherein = { mymodname .. "gray", mymodname .. "black" },
	clust_scarcity = 8 * 8 * 8,
	clust_num_ores = 16,
	clust_size = 16,
	y_max = 31000,
	y_min = -31000,
	--biomes 	       = {"greenland", "underground"}
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "gray_light",
	wherein = { mymodname .. "gray", mymodname .. "white" },
	clust_scarcity = 8 * 8 * 8,
	clust_num_ores = 16,
	clust_size = 16,
	y_max = 31000,
	y_min = -127,
	--biomes 	       = {"greenland"}
})

-- U N I Q U E   O R E S

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "amethyst",
	wherein = { mymodname .. "gray_dark", mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "bronze",
	wherein = { mymodname .. "gray_dark", mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "emerald",
	wherein = { mymodname .. "gray_dark", mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "ruby",
	wherein = { mymodname .. "gray_dark", mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "sapphire",
	wherein = { mymodname .. "gray_dark", mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "mese",
	wherein = { mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})

register_ore({
	ore_type = "scatter",
	ore = mymodname .. "obsidian",
	wherein = { mymodname .. "black" },
	clust_scarcity = 7 * 7 * 7,
	clust_num_ores = 5,
	clust_size = 3,
	y_max = -100,
	y_min = -31000,
	biomes = "underground",
})
--[[ testing for bedrock
register_ore({
	ore_type = "stratum",
	ore = mymodname .. "obsidian",
	wherein = { mymodname .. "gray" },
	clust_scarcity = 1,
	--clust_scarcity = 7 * 7 * 7,
	--clust_num_ores = 5,
	--clust_size = 3,
	y_max = -10,
	y_min = -11,
	biomes = "underground",
})
]]