Getting a color in a 0-1 float value

Is there a method gives you the color’s component’s value in a float value in the range 0-1? It’s odd I haven’t found one since you can declare a color in this way (using the 0-1 float value that is).

In case there isn’t one, I quickly wrote this code:

double r = (double)(new Color(0.1F, 0.2F, 0.3F, 0.4F)).getRed();
r /= 256;
System.out.println(r);

This outputs 0.1015625 as the amount of red in the color but you can clearly tell it really is 0.1. Is there a more accurate way of doing this?