I need to make a function that will fill a `Rectangle` with a color.
The method looks like this 

```
public void fillRect(Rectangle rect, int color)
{
    int red = color;
    int green = color;
    int blue = color;
    g.setColor(new Color(red, green, blue));
    g.fillRect(rect.getX(), rect.getY(), rect.getW(), rect.getH());
}

```

I would like to use an integer as parameter, for example `200100150` 
which would result in the value `200` for red (only the three first digits).

Is it possible to do this width java?