# Can background colour be variable?

**URL:** <https://forum.servoy.com/t/can-background-colour-be-variable/5510>\
**Category:** Classic Servoy\
**Created:** [February 22, 2006, 3:27pm UTC](https://forum.servoy.com/t/can-background-colour-be-variable/5510 "2006-02-22T15:27:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morley](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Morley](https://forum.servoy.com/u/Morley)\
**Post date:** [February 22, 2006, 3:27pm UTC](https://forum.servoy.com/t/can-background-colour-be-variable/5510/1 "2006-02-22T15:27:07Z")

</div>

Can the background colour of a form be variable, according to the value in a field?

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [February 22, 2006, 5:27pm UTC](https://forum.servoy.com/t/can-background-colour-be-variable/5510/2 "2006-02-22T17:27:48Z")

</div>

Not as far as I know, but a label can. Just place a label on the background of your form, anchor it at all corners and make it the size of the form.

---

<div class="post-metadata">

**Author:** ![Harry\_Catharell](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@Harry\_Catharell](https://forum.servoy.com/u/Harry_Catharell)\
**Post date:** [February 22, 2006, 7:28pm UTC](https://forum.servoy.com/t/can-background-colour-be-variable/5510/3 "2006-02-22T19:28:58Z")

</div>

Could ‘servoy\_row\_bgcolor’ calculation function be used for this ?

By replacing the index modulo test with the test required by Morley ?

Not even thought about this until now !

Cheers  
Harry

---

<div class="post-metadata">

**Author:** ![bcusick](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@bcusick](https://forum.servoy.com/u/bcusick)\
**Post date:** [March 3, 2006, 7:50pm UTC](https://forum.servoy.com/t/can-background-colour-be-variable/5510/4 "2006-03-03T19:50:25Z")

</div>

Hi Harry, yes, this will work.

Just for extra fun - you can also use GLOBAL VARIABLES in your background record calculation - so you can change them on the fly.
