package com.thatgravyboat.skyblockhud; import java.awt.*; public class SpecialColour { public static String special(int chromaSpeed, int alpha, int rgb) { return special(chromaSpeed, alpha, (rgb & 0xFF0000) >> 16, (rgb & 0x00FF00) >> 8, (rgb & 0x0000FF)); } private static final int RADIX = 10; public static String special(int chromaSpeed, int alpha, int r, int g, int b) { StringBuilder sb = new StringBuilder(); sb.append(Integer.toString(chromaSpeed, RADIX)).append(":"); sb.append(Integer.toString(alpha, RADIX)).append(":"); sb.append(Integer.toString(r, RADIX)).append(":"); sb.append(Integer.toString(g, RADIX)).append(":"); sb.append(Integer.toString(b, RADIX)); return sb.toString(); } private static int[] decompose(String csv) { String[] split = csv.split(":"); int[] arr = new int[split.length]; for(int i=0; i 0) { float seconds = getSecondsForSpeed(chr); hsv[0] += (System.currentTimeMillis()-startTime)/1000f/seconds; hsv[0] %= 1; if(hsv[0] < 0) hsv[0] += 1; } return (a & 0xFF) << 24 | (Color.HSBtoRGB(hsv[0], hsv[1], hsv[2]) & 0x00FFFFFF); } public static int rotateHue(int argb, int degrees) { int a = (argb >> 24) & 0xFF; int r = (argb >> 16) & 0xFF; int g = (argb >> 8) & 0xFF; int b = (argb) & 0xFF; float[] hsv = Color.RGBtoHSB(r, g, b, null); hsv[0] += degrees/360f; hsv[0] %= 1; return (a & 0xFF) << 24 | (Color.HSBtoRGB(hsv[0], hsv[1], hsv[2]) & 0x00FFFFFF); } }