From 43ed689824de3dad3c7ae332d59ed4c7303d16ef Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Fri, 22 Jul 2016 20:57:48 +1000 Subject: + Added a dust handler - Staballoy is now added. --- src/Java/miscutil/core/util/Utils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Java/miscutil/core/util/Utils.java') 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 -- cgit