Page 1 of 1

Question about setColor

Posted: Wed Sep 30, 2015 3:25 pm
by MichaelShort
Me and a friend are trying to make a replica of frogger. The frogs eye color is red and the frog is green. This code makes the frog green because of the setColor below it. How can we make it not turn blue and keep the frog the original color of the png. Thanks in advance.

Code: Select all

function love.draw()
	if play == true then
    	love.graphics.draw(player.playerImg, player.x, player.y)
    else
    	if play == false then
    		love.graphics.setFont(love.graphics.newFont(20))
    		love.graphics.setColor(0, 191, 255)
    		love.graphics.print("Press enter/return to start!", love.graphics:getWidth()/2-100, love.graphics:getHeight()/2)
    	end
    end
end



Re: Question about setColor

Posted: Wed Sep 30, 2015 3:28 pm
by Ulydev

Code: Select all

love.graphics.setColor(255, 255, 255)
love.graphics.draw(myImage, x, y)
Setting the color to plain white will draw an image with its original colours.

Re: Question about setColor

Posted: Wed Sep 30, 2015 3:32 pm
by MichaelShort
Ulydev wrote:

Code: Select all

love.graphics.setColor(255, 255, 255)
love.graphics.draw(myImage, x, y)
Setting the color to plain white will draw an image with its original colours.
Thank you so much. I was messing around with that and only tried (0,0,0) but now I noticed it made it black.