The Infolog

A blog of Dynamics AX development tips and tricks

Skip to: Content | Sidebar | Footer

Month: December, 2015

Validate if a string is a hex value

4 December, 2015 (20:16) | Dynamics AX | By: Howard Webb

I’ve recently needed to validate if a string was a colour hex value. There was not a standard method I could find to check (although I am convinced there must be a .net class I can use) but as speed was of the essence I wrote my own:    

Converting hex colour to RGB

3 December, 2015 (16:25) | Uncategorized | By: Howard Webb

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 […]