Converting hex colour to RGB
Throughout Dynamics AX it mostly uses integer values as a way of storing colours. Sometimes we need to either accept in hex or return hex colour values. To do this we can use the code found below which converts a hex string into its RGB values, then in to the integer value for those RGB values and then converts it back in to hex: