Color Schemes
From iRidium Mobile Wiki
Contents
DOWNLOAD: Example of a project
Working with Color
With iRidiumScript you can change the following colors used when displaying an object:
- FillColor,
- BorderColor,
- TextColor,
- TextEffectColor
To change the colors use the following commands:
IR.GetItem("Page_Name").GetItem("Item_Name").GetState(State_Number).Fillcolor=0xFFFFFFFF;
IR.GetItem("Page_Name").GetItem("Item_Name").GetState(State_Number).BorderColor=0xFFFFFFFF;
IR.GetItem("Page_Name").GetItem("Item_Name").GetState(State_Number).TextColor=0xFFFFFFFF;
IR.GetItem("Page_Name").GetItem("Item_Name").GetState(State_Number).TextEffectColor=0xFFFFFFFF;
- Page_Name - the name of the page with the selected item
- Item_Name - the name of the item which color you want to change
- State_Number - the number of state which color you want to change
- 0xFFFFFFFF - a color scheme in the Hex format
Color Format
In iRidiumScript the color schemes has the following structure:
0x FF FF FF FF
- FF - Red colors (00 - FF)
- FF - Green colors (00 - FF)
- FF - Blue colors (00 - FF)
- FF - Opacity (00 - FF)
Example
//The command for changing the color of background fill IR.GetItem("Page 1").GetItem("Item 1").GetState(0).FillColor = 0xFFFF00FF; //The command for changing the border color IR.GetItem("Page 1").GetItem("Item 1").GetState(0).BorderColor = 0xFFFF00FF; //The command for changing the text color IR.GetItem("Page 1").GetItem("Item 1").GetState(0).TextColor = 0xFFFF00FF; //The command for changing the text effect color /*(in development)*/ IR.GetItem("Page 1").GetItem("Item 1").GetState(0).TextEffectColor = 0xFFFFFFFF;
Main Color Codes
- Red 0xFF0000FF - Red
- Orange 0xFF5A00FF - Orange
- Yellow 0xFFFF00FF - Yellow
- Green 0x00FF00FF - Green
- Light blue 0x00FBFFFF - Light blue
- Dark blue 0x0000FFFF - Dark blue
- Violet 0xA000FFFF - Violet