str = GetTemplateColorName(nIdx)
This macro function returns the name of the template color of index nIdx of the current DiaryGridLine.
// get the name of the second template color
sColorName = GetTemplateColorName(2)
// apply this color to the sResult text
sResult = FormatText(sResult, 'COLOR(' + sColorName + ')', -1)
The value of the parameter nIdx is limited to the values 1, 2, or 3.
The template color names are usually defined by the template color of the GridOptions, but in some cases, an earlier call to SetTemplateColorName, within the same diary generation, might temporarily change a template color of the current DiaryGridLine.
See also: SetTemplateColorName, FormatText and template colors.
Topic 181025, last updated on 17-Oct-2026