Skip to content

Commit b3c3f55

Browse files
Merge pull request #809 from nextcloud/chore/noid/materialColorRepoSync
Automated Code Change sync 21/10/2025
2 parents a21d22b + 6d05291 commit b3c3f55

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

material-color-utilities/src/main/java/dynamiccolor/DynamicColor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
// A java_library Bazel rule with an Android constraint cannot skip these warnings without this
5252
// annotation; another solution would be to create an android_library rule and supply
5353
// AndroidManifest with an SDK set higher than 14.
54-
@SuppressWarnings({"AndroidJdkLibsChecker", "NewApi"})
54+
@SuppressWarnings("NewApi")
5555
public final class DynamicColor {
5656
public final String name;
5757
public final Function<DynamicScheme, TonalPalette> palette;

material-color-utilities/src/main/java/dynamiccolor/MaterialDynamicColors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// A java_library Bazel rule with an Android constraint cannot skip these warnings without this
2929
// annotation; another solution would be to create an android_library rule and supply
3030
// AndroidManifest with an SDK set higher than 14.
31-
@SuppressWarnings({"AndroidJdkLibsChecker", "NewApi"})
31+
@SuppressWarnings("NewApi")
3232
public final class MaterialDynamicColors {
3333

3434
private static final ColorSpec colorSpec = new ColorSpec2025();

material-color-utilities/src/main/java/temperature/TemperatureCache.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ private TemperatureCache() {
4848
* Create a cache that allows calculation of ex. complementary and analogous colors.
4949
*
5050
* @param input Color to find complement/analogous colors of. Any colors will have the same tone,
51-
* and chroma as the input color, modulo any restrictions due to the other hues having lower
52-
* limits on chroma.
51+
* and chroma as the input color, modulo any restrictions due to the other hues having lower
52+
* limits on chroma.
5353
*/
5454
public TemperatureCache(Hct input) {
5555
this.input = input;
@@ -83,14 +83,12 @@ public Hct getComplement() {
8383
// Find the color in the other section, closest to the inverse percentile
8484
// of the input color. This is the complement.
8585
for (double hueAddend = 0.; hueAddend <= 360.; hueAddend += 1.) {
86-
double hue = MathUtils.sanitizeDegreesDouble(
87-
startHue + directionOfRotation * hueAddend);
86+
double hue = MathUtils.sanitizeDegreesDouble(startHue + directionOfRotation * hueAddend);
8887
if (!isBetween(hue, startHue, endHue)) {
8988
continue;
9089
}
9190
Hct possibleAnswer = getHctsByHue().get((int) Math.round(hue));
92-
double relativeTemp =
93-
(getTempsByHct().get(possibleAnswer) - coldestTemp) / range;
91+
double relativeTemp = (getTempsByHct().get(possibleAnswer) - coldestTemp) / range;
9492
double error = Math.abs(complementRelativeTemp - relativeTemp);
9593
if (error < smallestError) {
9694
smallestError = error;
@@ -217,8 +215,7 @@ public List<Hct> getAnalogousColors(int count, int divisions) {
217215
*/
218216
public double getRelativeTemperature(Hct hct) {
219217
double range = getTempsByHct().get(getWarmest()) - getTempsByHct().get(getColdest());
220-
double differenceFromColdest =
221-
getTempsByHct().get(hct) - getTempsByHct().get(getColdest());
218+
double differenceFromColdest = getTempsByHct().get(hct) - getTempsByHct().get(getColdest());
222219
// Handle when there's no difference in temperature between warmest and
223220
// coldest: for example, at T100, only one color is available, white.
224221
if (range == 0.) {
@@ -284,7 +281,7 @@ private List<Hct> getHctsByHue() {
284281
// A java_library Bazel rule with an Android constraint cannot skip these warnings without this
285282
// annotation; another solution would be to create an android_library rule and supply
286283
// AndroidManifest with an SDK set higher than 23.
287-
@SuppressWarnings({"AndroidJdkLibsChecker", "NewApi"})
284+
@SuppressWarnings("NewApi")
288285
private List<Hct> getHctsByTemp() {
289286
if (precomputedHctsByTemp != null) {
290287
return precomputedHctsByTemp;

0 commit comments

Comments
 (0)