rgb(x,y,z):tcolor;或者integer;
begin
  result:=x*256*256+y*256+z;
end

解决方案 »

  1.   

    dergb(x:Tcolor):array of integer
    r,g,b:intager
    r:=integer(x/256/256)
    g:=integer((x-r*256*256)/256)
    b:=。返回[r,g,b]
    这是原理说明,具体编程不难。
      

  2.   

    Delphi中RGB也好用!!use Windows
      

  3.   

    scripting:
         请问一下,由tcolor求r,g,b呢?
           
      

  4.   

    scripting:
        我试了一下,在delphi中可直接使用rgb(r,g,b)函数,但其分解函数是什么,却不知?
      

  5.   

    GetRValue
    GetGValue
    GetBValue
      

  6.   

    同意sywxy
    合并时我是这样的
      Format('$00 %02x%02x%02x',[GetRValue(i),GetGValue(i),GetBValue(i)])
      返回一个字符串,你或者可改写一下。
      

  7.   

    functuin GetRValue(color : integer) : byte;
    begin
      result := byte(color shr 16);
    end;
    function GetGValue(color : integer) : byte;
    begin
      result := byte(color shr 8);
    end;
    function GetBValue(color : integer): byte;
    begin
      result := byte(color);
    end;function rgb(r,g,b:byte):integer;
    begin
      result := (integer(r) shl 16) + (integer(g) shl 8) + integer(b);
    end;