it looks like that there is a bug in the Color Assignment with a Style.
I have defined a Background color like:
Dim Color_Referral As Color = Color.FromArgb(255, 217, 151, 149)
'A = 255, B = 149, G = 151 and R = 217
'Name = ffd99795
If I assign this color like_
mStyle.BackgroundColor = Color_Referral
The color of mStyle is like
A = 0, B = 149, G = 151 and R = 217
Name = d99795
Please try to use ForegroundColor instead of BackgroundColor to set the cell’s Shading/fill color. Also set the Pattern to Solid fill. For your knowledge, the Foreground color is the cell’s outline color and Background color is the back color of the cell. But, keeping in mind, if you want to set cell’s shading color with solid fill/pattern type, you will always use ForegroundColor setter. There is no need to use Background color then that would be only useful if there is no solid/null background pattern type set for the cell. See the sample lines of code for your reference:
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.