Conv-Color 256 to 65535

From Vectorlab
Jump to: navigation, search


Converts a color in the range 0-255 (8-bits) to range 0-65535 (16-bits). By Orso B. Schmid


{ Orso *********************************************** }
{ converts a color part (red or green or blue) from 8 to 16 bits }
{ from range 0-255 to range 0-65535 }
FUNCTION C_65535(color: INTEGER): LONGINT;
	BEGIN
		C_65535 := color * 257;
		IF C_65535 > 65535 THEN
			C_65535 := 65535;
	END;