请问怎样才能得到某一RGB颜色的反颜色?急!!!谢谢!!!!!!
行的话马上结贴.
------------------------------------
体验速度,体验CSDN新版论坛助手:http://community.csdn.net/Expert/TopicView.asp?id=3108679

解决方案 »

  1.   

    COLORREF crSrc = ....;
    COLORREF crDst = 0x00ffffff-crSrc;
      

  2.   

    自己转
    COLORREF RGB = dc.GetPexel() | 0x00FFFFFF; //避免高位出错。
    COLORREF RGBRev = 0x00ffffff - RGB;
      

  3.   

    补充一下,如果你只有各个分色的值,比如R,G,B,那么反色等于:
    COLORREF ref = RGB(255-R,255-G,255-B);
    或者ref = 0x00ffffff - RGB(R,G,B);
      

  4.   

    First you have to define what is a reverse color. Reverse is always relative to an operation and a constant.What you guys are using is finding c' for c such that c + c' = white, so '+' is the operation.But reverse could also be defined by finding c' for c such that c XOR c' = white, so 'XOR' is the operation here.
      

  5.   

    呵呵。www.fengyuan.com 的方法不错