It's simple mathematics. A Color is created from red, blue and green components in the value 0 to 255. Use 0 for the blue, a percentage of 255 for the green and 100 less that percentage of 255 for the red.