Return RGB values from Range.Interior.Color (or any other Color Property)

前端 未结 7 1412
无人共我
无人共我 2020-11-27 06:55

I was trying to incrementally change the background color of a cell to black, and I found that the Range.Interior.Color method returns a Long which is seemingly arbitrary.

7条回答
  •  时光说笑
    2020-11-27 07:21

    good to see that Mr Wyatt uses the fast method of color to RGB

    R = C Mod 256
    G = C \ 256 Mod 256
    B = C \ 65536 Mod 256
    

    which is many times faster than those using hex str with left mid right that some recommend

提交回复
热议问题