# Color of Schedule Items in the calendar

**URL:** <https://forum.inductiveautomation.com/t/color-of-schedule-items-in-the-calendar/9813>\
**Category:** 3rd Party Modules\
**Created:** [March 18, 2015, 1:01am UTC](https://forum.inductiveautomation.com/t/color-of-schedule-items-in-the-calendar/9813 "2015-03-18T01:01:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miketob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miketob/32/5936_2.png) [@miketob](https://forum.inductiveautomation.com/u/miketob)\
**Post date:** [March 18, 2015, 1:01am UTC](https://forum.inductiveautomation.com/t/color-of-schedule-items-in-the-calendar/9813/1 "2015-03-18T01:01:08Z")

</div>

Hello,

Is it possible to define the color of a certain Schedule Item displayed in the ‘Schedule Week View’ or ‘Schedule day view’ ?

I’d like to highlight some to mark them as “important” or “Not Confirmed” or for any other purpose.

Thank you!

---

<div class="post-metadata">

**Author:** ![glogue](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@glogue](https://forum.inductiveautomation.com/u/glogue)\
**Post date:** [April 14, 2015, 4:19pm UTC](https://forum.inductiveautomation.com/t/color-of-schedule-items-in-the-calendar/9813/2 "2015-04-14T16:19:22Z")

</div>

I did something like this… color the background column in the Equipment Scheduler - Scheduled Events dataset based on the value in the PctDone column.

I put the following code in internalFrameOpened for the window.

```auto

data = system.gui.getParentWindow(event).getComponentForPath('Root Container.Equipment Schedule').scheduledEvents
object = system.gui.getParentWindow(event).getComponentForPath('Root Container.Equipment Schedule')

for x in range(data.getRowCount()):
	row = x
	background = data.getValueAt(row,'Background')
	pctDone = data.getValueAt(row,'PctDone')
	if pctDone == 0.0:
		backgroundcolor = 255,0,0
		background = data.setValueAt(row,6,backgroundcolor)
		object.repaint()
	elif pctDone == 100.0:
		backgroundcolor = 0,255,0
		background = data.setValueAt(row,6,backgroundcolor)
		object.repaint()
	else:
		backgroundcolor = 255,255,0
		background = data.setValueAt(row,6,backgroundcolor)
		object.repaint()

```
