How to check for boolean state?

ok so can you maybe give two things that should be influenced by your boolean? I’m pretty sure that it will not be impossible to do them, even with contextuality.

For example, the snippet that I showed can be made to work, like this:

#state("bla").update(true)

// make this a function and don't use context here
// b() can only be called inside context
#let b() = state("bla").get()

// get a value depending on b()
#col = context if b() { "red" } else { "green" }

#state("bla").update(false)

If b is true, we want red. Otherwise, we want green.

Since b is #context b(), the color is #col

And it will say “Since b is false, the color is green”.