ColourPaleete
Posted: Sun Jan 08, 2012 3:03 pm
http://colorschemedesigner.com/ - How is this implemented in Love?
I'm not exactly sure what you mean by implemented but it's easy to copy/paste scheme colors in your projects. Choose you colors, click in export > text. You get something like this:yarickyarick wrote:http://colorschemedesigner.com/ - How is this implemented in Love?
Code: Select all
var. 1 = #FFDE00 = rgb(255,222,0)
var. 2 = #BFAD30 = rgb(191,173,48)
var. 3 = #A69000 = rgb(166,144,0)
var. 4 = #FFE640 = rgb(255,230,64)
var. 5 = #FFED73 = rgb(255,237,115)
Code: Select all
color_v1 = love.graphics.setColor(255,222,0)
color_v2 = love.graphics.setColor(191,173,48)
color_v3 = love.graphics.setColor(166,144,0)
color_v4 = love.graphics.setColor(255,230,64)
color_v5 = love.graphics.setColor(255,237,115)
Actually I prefer the easier to remember:coffee wrote:Code: Select all
color_v1 = love.graphics.setColor(255,222,0) color_v2 = love.graphics.setColor(191,173,48) color_v3 = love.graphics.setColor(166,144,0) color_v4 = love.graphics.setColor(255,230,64) color_v5 = love.graphics.setColor(255,237,115)
Code: Select all
color = {
red = {255,0,0},
yellow = {255,255,0}
green = {0,255,0},
blue = {0,0,25},
white_trans = {255,255,255,175}
}
love.graphics.setColor(color.red)
By the way, that doesn't actually work. There are no color objects any more in LÖVE. Jasoco's example is the way to go.coffee wrote:Code: Select all
color_v1 = love.graphics.setColor(255,222,0) color_v2 = love.graphics.setColor(191,173,48) color_v3 = love.graphics.setColor(166,144,0) color_v4 = love.graphics.setColor(255,230,64) color_v5 = love.graphics.setColor(255,237,115)
The closest you could get to having something like that probably would be...Robin wrote:By the way, that doesn't actually work. There are no color objects any more in LÖVE. Jasoco's example is the way to go.coffee wrote:Code: Select all
color_v1 = love.graphics.setColor(255,222,0) color_v2 = love.graphics.setColor(191,173,48) color_v3 = love.graphics.setColor(166,144,0) color_v4 = love.graphics.setColor(255,230,64) color_v5 = love.graphics.setColor(255,237,115)
Code: Select all
function color_v1()
love.graphics.setColor(255,222,0)
end