Not sure if this is a bug or I am not doing it correctly however apart from the predefined colors raylib also seems to offer the ability to define your own colors using RGBA values.
I am however really struggling to get this to work. If you take a look at the images or text below.
I create the color using the code
// colors green2 = rl.Color{77, 255, 77, 1}
which seems to work fine however Visual Studio Code gives me a WARNING (not error)
However it allows me to compile the code the problem is that though the program runs the color is blank and does not display, what is supposed to be green is just blank with no color at all.
If you have any help/advice as to how to create/use custom colors it would be really appreciated.
All default colors are defined with NewColor(), so you should use that. Vet error is not related, you must use R: G: B: etc. in struct to avoid that, but as you see it cannot work like that.
Not sure if this is a bug or I am not doing it correctly however apart from the predefined colors raylib also seems to offer the ability to define your own colors using RGBA values.
I am however really struggling to get this to work. If you take a look at the images or text below.
I create the color using the code
// colors green2 = rl.Color{77, 255, 77, 1}
which seems to work fine however Visual Studio Code gives me a WARNING (not error)
github.com/lachee/raylib-goplus/raylib.Color composite literal uses unkeyed fields
However it allows me to compile the code the problem is that though the program runs the color is blank and does not display, what is supposed to be green is just blank with no color at all.
If you have any help/advice as to how to create/use custom colors it would be really appreciated.
Nicholas