quantize_color function

Find a scale mod k that matches a given color