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:
Sorry if there are any errors in this topic.
setColor bug
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: setColor bug
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:
black:
white:
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)
Code: Select all
love.graphics.setColor(0, 0, 0)
Code: Select all
love.graphics.setColor(1, 1, 1)
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua
LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua
Who is online
Users browsing this forum: Bing [Bot] and 3 guests