mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-06-07 08:03:37 +02:00
13 lines
554 B
Java
13 lines
554 B
Java
package de.ellpeck.actuallyadditions.common.utilities;
|
|
|
|
public class VisualHelper {
|
|
/**
|
|
* Stolen from Ell's original code, because lazy. What does it do? Something with wheels? (It's an hsb selector)
|
|
*/
|
|
public static float[] getWheelColor(float pos) {
|
|
if (pos < 85.0f) { return new float[] { pos * 3.0F, 255.0f - pos * 3.0f, 0.0f }; }
|
|
if (pos < 170.0f) { return new float[] { 255.0f - (pos -= 85.0f) * 3.0f, 0.0f, pos * 3.0f }; }
|
|
return new float[] { 0.0f, (pos -= 170.0f) * 3.0f, 255.0f - pos * 3.0f };
|
|
}
|
|
}
|