Conv-Color RGB-16 to range 0-1

From Vectorlab

Jump to: navigation, search


Converts each RGB longint value to the range 0-1. Useful for NCS color conversion (if you ever need such an exotic thing). By My display name


{ Orso *********************************************** }
{ converts rgb in values between 0-1 }
PROCEDURE C_RGB_01(r, g, b: LONGINT; VAR r1, g1, b1: REAL);
    BEGIN
        r1 := r/65535;
        g1 := g/65535;
        b1 := b/65535;
    END;
Personal tools