Conv-Color RGB-8 to Color Index

From Vectorlab
Jump to: navigation, search


Returns the color index from a RGB value in the range 0-255 (8-bit), converting first to range 0-65535 (16-bit). By Orso B. Schmid


{ Orso *********************************************** }
{ returns the color index from rgb value in 8-bit, converting first to 16-bit }
{ WARNING: THIS CREATES THE COLOR IN VW 13+ }
FUNCTION C_RGBtoColorIndexF(r, g, b: LONGINT): INTEGER;
	BEGIN
		RGBtoColorIndex(C_65535(r), C_65535(g), C_65535(b), C_RGBtoColorIndexF);
	END;