xkcd colors

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
cohadar
Prole
Posts: 25
Joined: Mon May 04, 2015 5:46 am
Contact:

xkcd colors

Post by cohadar »

https://github.com/cohadar/xkcd-color-l ... er/rgb.lua

In combination with for example this:

Code: Select all

-------------------------------------------------------------------------------
function setColor( name )
	local color = rgb[ name ]
	if color then
		love.graphics.setColor( color.r, color.g, color.b )
	else
		error( "bad color name: " .. name )
	end
end
you can do magic like this:

Code: Select all

setColor "indigo blue"
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests