List of usage examples for com.badlogic.gdx.graphics Color argb8888ToColor
public static void argb8888ToColor(Color color, int value)
From source file:org.catrobat.catroid.content.actions.SetPenColorAction.java
License:Open Source License
@Override protected void update(float delta) { try {/* w w w. ja va 2 s.c o m*/ int newRed = red == null ? 0 : red.interpretInteger(sprite); int newGreen = green == null ? 0 : green.interpretInteger(sprite); int newBlue = blue == null ? 0 : blue.interpretInteger(sprite); Color color = new Color(); Color.argb8888ToColor(color, android.graphics.Color.argb(0xFF, newRed, newGreen, newBlue)); sprite.penConfiguration.penColor = color; } catch (InterpretationException interpretationException) { Log.d(getClass().getSimpleName(), "Formula interpretation for this specific Brick failed.", interpretationException); } }