you can change the color of the BOX object from your code with the AppWizard engine using variables and jobs. The jobs and conditions can be various depending on your code.
Just for ex.: EMITTER: ID_VAR_BOX_COLOR SIGNAL: VALUE_CHANGED JOB: SETCOLOR RECEIVER: ID_YOUR_BOX
Interaction parameters: attach variable ID_VAR_BOX_COLOR as a color of the BOX. Then you can set this variable within your code using APPW_SetVarData(), here you go.