package org.simantics.common.utils; public class CommonUtils { public static double convertColor256ToDouble(int value) { // TODO: how close to 256 can we go? return (1/255.9999)*((double)value); } public static int convertDoubleToColor256(double value) { // TODO: how close to 256 can we go? return (int)(255.9999*value); } }