aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/config
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-30 13:22:05 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-30 13:22:05 +0100
commitc305d7b4b3b446ed85343e5248862fc157a13e5b (patch)
tree351fddaa0a6f4c6f9f037820fdd031333922393d /src/main/java/cc/polyfrost/oneconfig/config
parentd5c493075b9fc50edc7d8a22efeed08310d9ffe2 (diff)
downloadOneConfig-c305d7b4b3b446ed85343e5248862fc157a13e5b.tar.gz
OneConfig-c305d7b4b3b446ed85343e5248862fc157a13e5b.tar.bz2
OneConfig-c305d7b4b3b446ed85343e5248862fc157a13e5b.zip
finish OC-5, OC-10, checkboxes OC-6
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/core/OneColor.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/core/OneColor.java b/src/main/java/cc/polyfrost/oneconfig/config/core/OneColor.java
index 8135ac0..dbec72a 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/core/OneColor.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/core/OneColor.java
@@ -211,7 +211,14 @@ public final class OneColor {
* Return the color as if it had maximum saturation and brightness. Internal method.
*/
public int getRGBMax(boolean maxBrightness) {
- return HSBAtoRGBA(hsba[0], 100, maxBrightness ? 100 : hsba[2], 255);
+ if (dataBit == 0) dataBit = -1;
+ if (dataBit == -1) {
+ return HSBAtoRGBA(this.hsba[0], 100, maxBrightness ? 100 : 0, this.hsba[3]);
+ } else {
+ int temp = Color.HSBtoRGB(System.currentTimeMillis() % dataBit / (float) dataBit, 1, maxBrightness ? 1 : 0);
+ hsba[0] = (short) ((System.currentTimeMillis() % dataBit / (float) dataBit) * 360);
+ return ((temp & 0x00ffffff) | (hsba[3] << 24));
+ }
}
/**