How can I add (red, green, blue) values to my Java? For instance:
setColor(255, 0, 0);
You can get an instance of Color with simple code:
Color myWhite = new Color(255, 255, 255); // Color white
Then you can set the RGB color for your object like this:
g.setColor(myWhite);
Hope this helps you!
Source: https://habr.com/ru/post/1672547/More articles:Wordpress rewrites rule with custom taxonomy and custom post type - phpHow to save an instance of 'this' in a callback function - javascriptDoes Apache JMeter support HTTP / 2 requests? - apache-httpclient-4.xWhy doesn't an array access expression of a null array throw a NullPointerException? - javaAngular 2 save input form value bound to model using getter and setter - angularjsFrame Web VR prevents scrolling from bootstrap when importing as an HTML template - javascriptGraphQL и вложенные ресурсы будут делать ненужные вызовы? - graphqlКак сообщить Visual Studio код об относительном пути - visual-studio-codeRunge-Kutta C ++ Algorithm - c ++Как удалить исключение "Предопределенный тип" ValueTuple`2 "должен быть структурой при отладке? - debuggingAll Articles