s

解决方案 »

  1.   

    var
      I:LongInt;
      R,G,B:Byte;
      Color:TColor;
    begin
      I:=ColorToRGB(Color);
      R:=I shr 24;
      G:=(I and $00FF0000) shr 16;
      B:=I and $0000FF00;
    end;
      

  2.   

    更正:
    var
      I:LongInt;
      R,G,B:Byte;
      Color:TColor;
    begin
      I:=ColorToRGB(Color);
      B:=I shr 24;
      G:=(I and $00FF0000) shr 16;
      R:=(I and $0000FF00) shr 8;
    end;
      

  3.   

    http://expert.csdn.net/Expert/topic/1472/1472467.xmlR := Color and $FF;
    G := (Color and $FF00) shr 8;
    B := (Color and $FF0000) shr 16;
      

  4.   

    (*Cvs:TCanvas*)
    Var
      R,G,B:Byte;
    Begin
        With Cvs Do
        Begin
             R:=GetRValue(Pixels[1,1]);
             G:=GetGValue(Pixels[1,1]);
             B:=GetBValue(Pixels[1,1]);
        End;
    End;