monkey2 color?
Community Forums/Monkey Talk/monkey2 color?
| ||
ok, how do I directly access the color command? E.G.canvas.Color = New Color(0.06, 0.06, 0.06) I have no idea where to look to find out what Color is made up from, logic would dictate red, green, blue, or Red, Green, Blue or maybe even r,g,b I want to be able to access canvas.Color.red I want to see what canvas.Color.red is and I want to change canvas.Color.red Pity there is no help, no command list, nothing!!!!!! I'll even write it, but finding out where anything is in the language is not a simple task |
| ||
If you look at the module source you can find out what is exactly the case, but also the docs in the monkey2/docs folder (use the index.html file) will give you access to what is docced at the moment. Color btw is R,G,B,A (all floats, from 0.0 to 1.0) |
| ||
Looking in the source code the Class Color has the .r .g .b .a for red,green, blue and alpha parameters. |
| ||
mmm, yes, but If you look at the module source which module? how do you know it is in a module? again Looking in the source code the Class Color has the .r .g .b .a which source |
| ||
The color Struct is in the std module where you'll find a lot of the other general stuff like vec and matrix: std/graphics/color.monkey2 |
| ||
Docs are searchable, go here and type Color into the search box (do NOT hit enter) |
| ||
sorry wrong post.. |
| ||
btw the search also reveals that std.graphics.Color is not alone and mojo.graphics.Canvas.Color is also a thing... |
| ||
Yes, but there it's a property of the canvas (a field) . You can have properties having with the name. |