well what you could do, and i am sure this is probably not the best solution... but it's the top one off of my head so usually it's not a good idea to treat booleans as a number in lower level type stuff but it's fine here, in fact we could just use actual number representation instead but I'll steer back we could also create a profile as well
// use dark as the factor in determining color, which is a bit harder
var isLight = false;
var bg = rgb(255 * isLight, 255 * isLight, 255 * isLight);
// or like in most html stuff you just shove it into an object
var profile = [{
mode: "Dark",
bg: rgb(0, 0, 0),
text: rgb(120, 120, 120) // can be an array to
},
{
mode: "Light",
bg: rgb(255, 255, 255),
text: rgb(0, 0, 0)
}
]
// sample code for when context is used
var mode = profile[isLight];
background(mode.bg);