public static int chroma(int color)
    {
        int red = (color & RED_MASK) >> 16; 
        int green = (color & GREEN_MASK) >> 8;
        int blue = (color & BLUE_MASK);

        int max = red;
        int min = red;
        List<Integer> d = Arrays.asList(red,green,blue);
        for(int c : d) {
            if(c > max) max = c;
            if(c < min) min = c;
        }
        
        return max-min;
    }