sorcery  Diff

Differences From Artifact [e07c3f3979]:

To Artifact [818d3ded97]:

  • File lib/color.lua — part of check-in [ea6e475e44] at 2020-10-19 09:52:11 on branch trunk — continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes (user: lexi, size: 5988) [annotate] [blame] [check-ins using]

197
198
199
200
201
202
203



204
205
206
207

208
209
210
211
212
213
214
215
216
217
218
				new.green = clip(new.green - (new.green * fac))
			end);
		}
		if g == nil then
			if type(r) == 'string' then
				assert(false) -- TODO parse color string
			elseif type(r) == 'table' then



				new.red = r[1]
				new.green = r[2]
				new.blue = r[3]
				new.alpha = r[4]

			else assert(false) end
		else
			new.red = r
			new.green = g
			new.blue = b
			new.alpha = a
		end
		return new
	end
}
return color







>
>
>
|
|
|
|
>











197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
				new.green = clip(new.green - (new.green * fac))
			end);
		}
		if g == nil then
			if type(r) == 'string' then
				assert(false) -- TODO parse color string
			elseif type(r) == 'table' then
				if r.hue then
					return from_hsl(r, r.alpha or g)
				else
					new.red = r[1]
					new.green = r[2]
					new.blue = r[3]
					new.alpha = r[4]
				end
			else assert(false) end
		else
			new.red = r
			new.green = g
			new.blue = b
			new.alpha = a
		end
		return new
	end
}
return color