Sign in to follow this  
Followers 0
lsakizada

_GUICtrlRichEdit_SetBkColor() return wrong color?

3 posts in this topic

I get wrong color in richedit control.

The following function supposed to paint the control with light blue but insteed the tint is reddish.

_GUICtrlRichEdit_SetBkColor($hReachEdit,0xEDF3FE)

you can check with the code that come with the examples of this function.


Be Green Now or Never (BGNN)!

Share this post


Link to post
Share on other sites



The colour "0xEDF3FE" in in BGR format appears reddish.

The colour "0xEDF3FE" in in RGB format appears light blue.

; Enter colour in BGR format i.e. 0xBBGGRR, 
; where BB is blue channel hex value; GG - is green channel hex value; and, RR is red channel hex value
_GUICtrlRichEdit_SetBkColor($hRichEdit,"0xEDF3FE")

; This RegExpRepl converts BGR colour format to RGB colour format and visa versa. i.e. RGB format value looks like this 0xRRGGBB 
_GUICtrlRichEdit_SetBkColor($hRichEdit,StringRegExpReplace("0xEDF3FE","(.{2})(.{2})(.{2})(.{2})","\1\4\3\2"))

Share this post


Link to post
Share on other sites

The colour "0xEDF3FE" in in BGR format appears reddish.

The colour "0xEDF3FE" in in RGB format appears light blue.

; Enter colour in BGR format i.e. 0xBBGGRR, 
; where BB is blue channel hex value; GG - is green channel hex value; and, RR is red channel hex value
_GUICtrlRichEdit_SetBkColor($hRichEdit,"0xEDF3FE")

; This RegExpRepl converts BGR colour format to RGB colour format and visa versa. i.e. RGB format value looks like this 0xRRGGBB 
_GUICtrlRichEdit_SetBkColor($hRichEdit,StringRegExpReplace("0xEDF3FE","(.{2})(.{2})(.{2})(.{2})","\1\4\3\2"))

Thank you Malkey! sovlve my issue.

Have a good one.


Be Green Now or Never (BGNN)!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0