Conv-Color 65535 to 256

From Vectorlab
Jump to: navigation, search


Converts a color part (longint) from range 0-65535 (16-bits) to range 0-255 (8-bits). By Orso B. Schmid


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