Calendar.Calendar.SetColor
--------------------------

Sets the color for a calendar.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Calendar](component_Calendar.md) | [3.4](newinversion34.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md).

MBS( "Calendar.Calendar.SetColor"; calendarRef; Color ) 

**MBS**( **"Calendar.Calendar.SetColor";** /\* Sets the color for a calendar. \*/  
**$calendarRef**; /\* The id of the calendar to query. \*/   
**$Color**) /\* The color to use. Can be a color name or hex notation like in HTML.e.g. "red" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| calendarRef | The id of the calendar to query. | $calendarRef |
| Color | The color to use. Can be a color name or hex notation like in HTML. | "red" |

### Result

Returns OK or error message.

### Description

Sets the color for a calendar.  
### Examples

Sets calendar to red:

 MBS ( "Calendar.Calendar.SetColor"; $CalendarID ; "#FF0000" )  
### See also

- [Calendar.Calendar.GetColor](CalendarCalendarGetColor.md)
- [Calendar.Calendar.GetNotes](CalendarCalendarGetNotes.md)
- [Calendar.Calendar.GetTitle](CalendarCalendarGetTitle.md)
- [Calendar.Calendar.GetType](CalendarCalendarGetType.md)
- [Calendar.Calendar.GetUID](CalendarCalendarGetUID.md)
- [Calendar.Calendar.SetNotes](CalendarCalendarSetNotes.md)
- [Calendar.Calendar.SetTitle](CalendarCalendarSetTitle.md)
- [Calendar.SaveCalendar](CalendarSaveCalendar.md)
- [Events.Calendar.GetColor](EventsCalendarGetColor.md)
- [Events.Calendar.SetColor](EventsCalendarSetColor.md)

### Example Databases

- [Mac and iOS/Events/Calendar/Calendar Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Calendar/Calendar%20Test.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[Calendar.Calendar.IsEditable](CalendarCalendarIsEditable.md) - [Calendar.Calendar.SetNotes](CalendarCalendarSetNotes.md)

[HTML Version](CalendarCalendarSetColor.shtml)