Hi,
In order to get data from your database you need to use query, check it out here .
After you have the boolean write the condition, for example:
if(boolean == "true"){// boolean is the boolean you got from the database
$w("#box").style.backgroundColor = "#ffff";
}
else{
$w("#box").style.backgroundColor = "#ef0";
}