Loading play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/Styles.kt +5 −5 Original line number Diff line number Diff line Loading @@ -301,7 +301,7 @@ fun Styler.applyColorChanges(color: Int): Int { // Apply hue to layer color ColorUtils.colorToHSL(color, hslResult) hslResult[0] = hueDegree return ColorUtils.HSLToColor(hslResult) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hslResult), Color.alpha(color)) } lightness?.let { lightness -> Loading @@ -315,7 +315,7 @@ fun Styler.applyColorChanges(color: Int): Int { // Increase brightness. Percentage amount = relative reduction of difference between is-lightness and 1.0. hsl[2] + (lightness / 100) * (1 - hsl[2]) } return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } saturation?.let { saturation -> Loading @@ -330,7 +330,7 @@ fun Styler.applyColorChanges(color: Int): Int { hsl[1] + (saturation / 100) * (1 - hsl[1]) } return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } gamma?.let { gamma -> Loading @@ -339,7 +339,7 @@ fun Styler.applyColorChanges(color: Int): Int { ColorUtils.colorToHSL(color, hsl) hsl[2] = hsl[2].toDouble().pow(gamma.toDouble()).toFloat() return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } if (invertLightness == true) { Loading @@ -348,7 +348,7 @@ fun Styler.applyColorChanges(color: Int): Int { ColorUtils.colorToHSL(color, hsl) hsl[2] = 1 - hsl[2] return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } this.color?.let { Loading Loading
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/Styles.kt +5 −5 Original line number Diff line number Diff line Loading @@ -301,7 +301,7 @@ fun Styler.applyColorChanges(color: Int): Int { // Apply hue to layer color ColorUtils.colorToHSL(color, hslResult) hslResult[0] = hueDegree return ColorUtils.HSLToColor(hslResult) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hslResult), Color.alpha(color)) } lightness?.let { lightness -> Loading @@ -315,7 +315,7 @@ fun Styler.applyColorChanges(color: Int): Int { // Increase brightness. Percentage amount = relative reduction of difference between is-lightness and 1.0. hsl[2] + (lightness / 100) * (1 - hsl[2]) } return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } saturation?.let { saturation -> Loading @@ -330,7 +330,7 @@ fun Styler.applyColorChanges(color: Int): Int { hsl[1] + (saturation / 100) * (1 - hsl[1]) } return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } gamma?.let { gamma -> Loading @@ -339,7 +339,7 @@ fun Styler.applyColorChanges(color: Int): Int { ColorUtils.colorToHSL(color, hsl) hsl[2] = hsl[2].toDouble().pow(gamma.toDouble()).toFloat() return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } if (invertLightness == true) { Loading @@ -348,7 +348,7 @@ fun Styler.applyColorChanges(color: Int): Int { ColorUtils.colorToHSL(color, hsl) hsl[2] = 1 - hsl[2] return ColorUtils.HSLToColor(hsl) return ColorUtils.setAlphaComponent(ColorUtils.HSLToColor(hsl), Color.alpha(color)) } this.color?.let { Loading