If you are using a Splunk version 6.5 or higher - you can do it from UI.
Click on the brush icon next to the table header upon choosing the edit dashboard. It will give a color option. Click on that
Choose range and entry the values for the range and desired colors.
Edit Dashboard --> Click on the brush Icon next to the column header -->Choose Color -->Select "Range" from drop down -->Enter the range of values -->Save.