Colors in fonts and backgrounds.

AntonBrz

Member
Licensed User
Longtime User
I wanted to know what colors are legal for backgrounds when font colors can be specified as they can in custom toast. For example, if the line is something like:

toast ("message here.", colors.red,colors.black)

Where black is the background.
what are acceptable colors to substitute for black? I know the example might not be correct but the important thing to me is, what words can I use for colors after the "colors." tag? Gray works, blue and red as well as black, work, but other color words don't. It takes long for my program to compile and get to the emulator to test each color word, and I only saw blue, red, black and gray in examples. What are the other legal color words please? Also, can I leave a color out somehow and use a word for transparent?
colors.trans didn't seem to work.

Thanks
Anton
 

mangojack

Expert
Licensed User
Longtime User
You can also use RGB Values for CustomToastMessage fonts and backgrounds .. as well as other views.

B4X:
MyT.ToastMessageShow2("This is a Color Test ...",  5, 0, 0, "", Colors.RGB(255,248,220), Colors.RGB(165,42,42), 15, True)

Attached is Excel color chart reference. Do a search for color picker apps also as another way of getting RGB values.

Also when you type " Colors. " a list should appear with Color Name Constants .. the last on the list is Colors. "Transparent"

Cheers mj
 

Attachments

  • Android Color Chart.zip
    17.2 KB · Views: 305
Upvote 0

AntonBrz

Member
Licensed User
Longtime User
Color info

Great. This will be useful in a lot of instances. I've been using rgb values for years, I'll be applying this right away. And the transparent background will be extremely useful. This is something very easy to implement.Thanks.

Anton
:sign0142:
 
Upvote 0
Top