### List jFX Standardcolors

As defined in the jFX library, the list of colors with their Int Values
Black, Blue, Cyan, DarkGray, Gray, Green, LightGray, Magenta, Red, Transparent, White, Yellow
`Sub Process_Globals
'Core Controls
Private fx As JFX
End Sub`
Use the Colors
fx.Colors.Black = -16777216
fx.Colors.Blue = -16776961
fx.Colors.Cyan = -16711681
fx.Colors.DarkGray = -12303292
fx.Colors.Gray = -7829368
fx.Colors.Green = -16711936
fx.Colors.LightGray = -3355444
fx.Colors.Magenta = -65281
fx.Colors.Red = -65536
fx.Colors.Transparent = 0
fx.Colors.White = -1
fx.Colors.Yellow = -256
Note
To convert colors using jFX methods fx.Colors.From32Bit(int) and fx.Colors.To32Bit(Color).
Note
When a color is saved to a string, the format is 32bit Hex string RGBA
Examples:
Dim hex As String = "0x0000ffff" which is fx.Colors.blue
Dim hex As String = "0xffff00ff" which is fx.Colors.yellow
To convert see B4J HowTo "Set RGBA Color from 32bit Hex".
Color Arrays
Private FXColors() As Paint = Array As Paint(fx.Colors.Black, fx.Colors.Blue, fx.Colors.Cyan, fx.Colors.DarkGray, fx.colors.Gray, fx.Colors.Green,fx.Colors.LightGray,fx.Colors.Magenta,fx.Colors.Red,fx.Colors.Transparent, fx.Colors.White, fx.Colors.Yellow)
Private FXColorNames() As String= Array As String("Black","Blue","Cyan","DarkGray","Gray","Green","LightGray","Magenta","Red","Transparent", "White", "Yellow")
Add Colors to a ChoiceBox using Color Arrays
Private ChoiceBoxBackground As ChoiceBox
Private backgroundColor As Paint = fx.Colors.Yellow
ChoiceBoxBackground.Items.AddAll(FXColorNames)
`Sub ChoiceBoxBackground_SelectedIndexChanged(Index As Int, Value As Object)
If Index < 0 Then Return
backgroundColor = FXColors(Index)
End Sub`

Changed: , Category: Colors, File: T6C174M1260.htm, ID: 1260