@@ -34,6 +34,8 @@ internal object ModuleList : HudElement(
3434 private val rainbow by setting(" Rainbow" , true )
3535 private val rainbowLength by setting(" Rainbow Length" , 10.0f , 1.0f .. 20.0f , 0.5f , { rainbow })
3636 private val indexedHue by setting(" Indexed Hue" , 0.5f , 0.0f .. 1.0f , 0.05f , { rainbow })
37+ private val saturation by setting(" Saturation" , 1.0f , 0.0f .. 1.0f , 0.05f , { rainbow })
38+ private val brightness by setting(" Brightness" , 1.0f , 0.0f .. 1.0f , 0.05f , { rainbow })
3739 private val primary by setting(" Primary Color" , ColorHolder (155 , 144 , 255 ), false )
3840 private val secondary by setting(" Secondary Color" , ColorHolder (255 , 255 , 255 ), false )
3941
@@ -103,7 +105,6 @@ internal object ModuleList : HudElement(
103105 }
104106
105107 private fun drawModuleList () {
106- val primaryHsb = Color .RGBtoHSB (primary.r, primary.g, primary.b, null )
107108 val lengthMs = rainbowLength * 1000.0f
108109 val timedHue = System .currentTimeMillis() % lengthMs.toLong() / lengthMs
109110
@@ -127,7 +128,7 @@ internal object ModuleList : HudElement(
127128
128129 if (rainbow) {
129130 val hue = timedHue + indexedHue * 0.05f * index++
130- val color = ColorConverter .hexToRgb(Color .HSBtoRGB (hue, primaryHsb[ 1 ], primaryHsb[ 2 ] ))
131+ val color = ColorConverter .hexToRgb(Color .HSBtoRGB (hue, saturation, brightness ))
131132 module.newTextLine(color).drawLine(progress, true , HAlign .LEFT , FontRenderAdapter .useCustomFont)
132133 } else {
133134 textLine.drawLine(progress, true , HAlign .LEFT , FontRenderAdapter .useCustomFont)
0 commit comments