I am trying to do a if statement is red equals 0.90196078431373 but it does not work.
If i do print(red) it shows the numbers
local ragdogLib = require "ragdogLib"; function randomcolor() local colors = { "#e67e22","#e74c3c" ,"#f1c40f","#1abc9c","#8e44ad" } local finalcolor = colors[math.random(1, 5)]
local function addnewobject() local bombstartnew = display.newRect( startingpoint, -340, 50, 50) red, green, blue = ragdogLib.convertHexToRGB(randomcolor()) bombstartnew:setFillColor(red,green,blue); if (red == "0.90196078431373") then print("color") end
timer.performWithDelay( 500, addnewobject, 0 )