Langbahn Team – Weltmeisterschaft

Module:Sandbox/IJReid/Geological data

base = { }

--Variables etc
rgb = {}
rgb["Mesozoic"] = {
	[1] = 7,
	[2] = 202,
	[3] = 234,}
rgb["Cretaceous"] = {
	[1] = 111,
	[2] = 200,
	[3] = 107,}
rgb["Jurassic"] = {
	[1] = 0,
	[2] = 187,
	[3] = 231,}
rgb["Triassic"] = {
	[1] = 153,
	[2] = 78,
	[3] = 150,}

Mesozoic = 244445

start = {}
start["Mesozoic"] = 251.902
start["Cretaceous"] = 145
start["Jurassic"] = 201.3
start["Triassic"] = start["Mesozoic"]

--Period color function
base.periodcolor = function(period, format)
	if format == "rgb255" then
		return rgb[period[1]] .. ", " .. rgb[period[2]] .. ", " .. rgb[period[3]]
	end
	if format == "rgb1" then
		local conversion_holder1 = rgb[period[1]] / 255
		local conversion_holder2 = rgb[period[2]] / 255
		local conversion_holder3 = rgb[period[3]] / 255
		
		return conversion_holder1 .. ", " .. conversion_holder2 .. ", " .. conversion_holder3
	end
end

base.periodstart = function(period)
	return start[period]
end

return base