Table of Contents

 

Color

A Color definition in TDL is a reusable styling element that controls the foreground and background colors of UI elements in TallyPrime. It helps create consistent, readable, and visually distinct interfaces across reports, fields, forms, menus and other interface objects. Crystal Blue, Canary Yellow are examples of Color definitions from Default TDL.

Syntax

[Color : <Color Name>]

RGB : <Red>, <Green>, <Blue>

Example

[Color: TSPL Color]

RGB : 255, 156, 40

 

➥ Click here to download the color sample

Attributes

Whether you want your UI elements to look subtle and classy or bright and shiny, RGB attribute gives you enormous range of color spectrum from where you can choose the values that suits your style. Make each of your reports have its own voice like how Tally vouchers speak their type with their color even before the eye reads the voucher type.

Syntax

RGB : <Red>, <Green>, <Blue>

<Red>, <Green>, <Blue> Specify a value for each between 0 and 255

Example

[Color: TSPL Color]

RGB : 255, 156, 40

This defines TSPL Color where the RGB attribute provides a bright orange color in the active state of the UI element.

When you want to light up your report with colors, but do not want to have finer tuning by specifying RGB values, this attribute is your friend. Just pick a value from 0 to 240 and viola! the system automatically adjusts the hue, saturation and brightness of the element as per the value picked and makes your report look its part.
If you want the Color attribute of color definition to provide the color to your element, make sure RGB attribute is not specified in the color definition, as RGB takes precedence.

Syntax

Color : <Value Formula>

<Value Formula> A direct value or a formula that evaluates to a number between 0 and 240

Example

[Color: TSPL Color]

Color: 189

Defines a new color TSPL Color which sets the color to 189. This might generate a light blue or teal color, depending on the internal color engine.

Like you have a color for all the moods, you can specify colors for your UI elements as per their moods as well, making it possible to scream the state of your report just by seeing its color. While the attributes, Color and RGB defines the colors in the active state of the application, InactiveRGB attribute lets you fix a color for the element when the application goes into inactive state.

Syntax

Inactive RGB : <Red>, <Green>, <Blue>

<Red>, <Green>, <Blue> Specify a value for each between 0 and 255

Example

[Color : TSPL Color]

RGB : 255, 156, 40

Inactive RGB: 150, 150, 150

Greyback RGB: 182, 179, 171

Defines a new color TSPL Color which provides the following colors to the UI element
Active state = bright orange (RGB)
Inactive state = plain grey (Inactive RGB)
Greyed-out state = slightly different grey (Greyback RGB)

A pop up menu or a message box appears on your report, and your report goes to greyback state, and suddenly your well formatted, well coloured report doesn’t look polished enough. That’s when GreybackRGB attribute comes to the rescue. Like how the Tally reports and menus look uniformly colored even in Greyback state, set the colors of your UI elements in greyback state using the GreybackRGB attribute of Color definition and make them look neat and clean.

Syntax

Greyback RGB : <Red>, <Green>, <Blue>

<Red>, <Green>, <Blue> Specify a value for each between 0 and 255

Example

[Color: TSPL Color]

RGB : 255, 156, 40

Greyback RGB: 182, 179, 171

Defines a new color TSPL Color which provides the following colors to the UI element
Active state = bright orange (RGB)
Greyed-out state = neutral grey (Greyback RGB)

Like we say, be a Roman in Rome, how about your UI elements having a look like it belongs to the OS platform. Syscolor attribute does exactly that. Gives you a list of predefined system color that the operating system uses for various user interface elements. Choose from the list and make your UI elements look as elegant as your OS.
If you want the Syscolor attribute of color definition to provide the color for the UI element, make sure RGB or Color attribute is not specified in the color definition, as they take precedence.

Syntax

SysColor: <System Color Keyword>

<System Color Keyword>The current keywords list : 3d Dark Shadow, 3d Highlight, 3d Light, 3d Shadow, Active Caption, Workspace, Button Text, Disabled Text, Selected, Selected Text, Inactive Caption, Inactive Caption Text, Tooltip Background, Tooltip Text, Menu Text, Window Frame and Window Text.

Example

[Color: TSPL Color]

SysColor: Window Frame

Defines a new color TSPL Color that uses the system-defined color for “Window Frame” in the syscolor attribute— ensuring it matches the OS’s native style for borders or frames

Is this information useful?
YesNo
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
TARA