Jump to content

_GUICtrlRichEdit_SetBkColor() return wrong color?


 Share

Recommended Posts

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)!

Link to comment
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"))
Link to comment
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)!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...