aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core/util/Utils.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-07-22 20:57:48 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-07-22 20:57:48 +1000
commit43ed689824de3dad3c7ae332d59ed4c7303d16ef (patch)
tree91bac2165dbf54cceab7361ef2f64c6cde8a8cc1 /src/Java/miscutil/core/util/Utils.java
parentf3f99ebf638e7ef9a47458d516e0f64f585f963f (diff)
downloadGT5-Unofficial-43ed689824de3dad3c7ae332d59ed4c7303d16ef.tar.gz
GT5-Unofficial-43ed689824de3dad3c7ae332d59ed4c7303d16ef.tar.bz2
GT5-Unofficial-43ed689824de3dad3c7ae332d59ed4c7303d16ef.zip
+ Added a dust handler - Staballoy is now added.
Diffstat (limited to 'src/Java/miscutil/core/util/Utils.java')
-rw-r--r--src/Java/miscutil/core/util/Utils.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Java/miscutil/core/util/Utils.java b/src/Java/miscutil/core/util/Utils.java
index 9a91a03ed8..0e49521ccc 100644
--- a/src/Java/miscutil/core/util/Utils.java
+++ b/src/Java/miscutil/core/util/Utils.java
@@ -366,6 +366,17 @@ public class Utils {
int result = getHexNumberFromInt(randInt(min, max));
return result;
}
+
+ public static int rgbtoHexValue(int r, int g, int b){
+ Color c = new Color(r,g,b);
+ String temp = Integer.toHexString( c.getRGB() & 0xFFFFFF ).toUpperCase();
+
+ System.out.println( "hex: " + Integer.toHexString( c.getRGB() & 0xFFFFFF ) + " hex value:"+temp);
+ temp = Utils.appenedHexNotationToString(String.valueOf(temp));
+ Utils.LOG_INFO("Made "+temp+" - Hopefully it's not a mess.");
+ Utils.LOG_INFO("It will decode into "+Integer.decode(temp)+".");
+ return Integer.decode(temp);
+ }
/*
* http://javadevnotes.com/java-left-pad-string-with-zeros-examples