Android Question RGB different color result between b4a and website

kris A

Member
Licensed User
Longtime User
i have some trouble in my apps
this RGB code (
B4X:
Colors.RGB(259,229,155)
) in my b4a project produce green color, while when i check into website color picker ( https://www.webpagefx.com/web-design/color-picker/ ) using exact same RGB code, and ms access aplication, it produce yellow color.


why is this happening?
what should i do to make the color as same as the other apps ? (website & ms access)

my code attached.

please advice

thanks a lot
 

Attachments

  • test_rgb.zip
    7.4 KB · Views: 183
Last edited:

udg

Expert
Licensed User
Longtime User
Did you notice you set 259 as first parameter in Colors.RGB(259,229,155)?
That makes your code like (3,229,155), so a green tint.
 
Last edited:
Upvote 0

kris A

Member
Licensed User
Longtime User
Did you notice you set 259 as first parameter in Colors.RGB(259,229,155)?
That makes your code like (3,229,155), so a green tint.

great !
i'll make a valid validation into my RGB code, like if some RGB parameters more than 255, i'll set it into 255.

thank you very much for your awesome feedback.
 
Upvote 0
Top