mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-18 10:15:08 +01:00
Unify the test mod ID
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
package eu.midnightdust.lib.util;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
public class MidnightColorUtil {
|
||||
/**
|
||||
* @param colorStr e.g. "FFFFFF" or "#FFFFFF"
|
||||
* @return Color as RGB
|
||||
*/
|
||||
public static Color hex2Rgb(String colorStr) {
|
||||
try { return Color.decode("#" + colorStr.replace("#", ""));
|
||||
} catch (Exception ignored) { return Color.BLACK; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user