Question about setColor

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MichaelShort
Prole
Posts: 14
Joined: Mon Sep 28, 2015 3:28 pm

Question about setColor

Post 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


Last edited by MichaelShort on Wed Sep 30, 2015 3:33 pm, edited 2 times in total.
User avatar
Ulydev
Party member
Posts: 445
Joined: Mon Nov 10, 2014 10:46 pm
Location: Paris
Contact:

Re: Question about setColor

Post 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.
MichaelShort
Prole
Posts: 14
Joined: Mon Sep 28, 2015 3:28 pm

Re: Question about setColor

Post 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.
Post Reply

Who is online

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