Page 1 of 1

setColor bug

Posted: Thu Aug 09, 2018 1:47 am
by Paulo Soreto
In the wiki (https://love2d.org/wiki/love.graphics.setColor), says:
"In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1."
This really works fine when I use setColor(number, number, number), the range is 0 to 255, but when I pass a table that contains the colors the range is 0 to 1.
Is this a bug or setColor behavior are correct?

I'm using love 11.1:
Image

Sorry if there are any errors in this topic.

Re: setColor bug

Posted: Sun Aug 12, 2018 6:09 pm
by D0NM
Please quote your code here.

And since you are using Love 11.1, then
your colour values range is 0 ... 1

e.g. Set some grey colour:

Code: Select all

love.graphics.setColor(0.45, 0.45, 0.45)
black:

Code: Select all

love.graphics.setColor(0, 0, 0)
white:

Code: Select all

love.graphics.setColor(1, 1, 1)