Skip to content

Commit

Permalink
ChippedModule: Another tweaks on palette codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelbayria committed Feb 1, 2025
1 parent cd41870 commit 369c650
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,10 @@ public ChippedModule(String modId) {
p.reduceDown();
PaletteColor darker = p.getDarkest(); // 2nd darkest after 1st darkest
p.reduceDown();
p.matchLuminanceStep(0.03F);
p.reduceDown();
PaletteColor dark = p.getDarkest();
p.reduceDown();
p.reduceUp();
if (p.size() < 11) {
while (p.size() <= 11) {
p.increaseInner();
Expand All @@ -517,6 +520,7 @@ public ChippedModule(String modId) {
p.reduce();
}
}
p.add(dark);
p.add(darker);
})
.setTabKey(tab)
Expand Down Expand Up @@ -1888,9 +1892,6 @@ private void dullerPalette(Palette p) {
}

private void matchSizeAndModifyLuminance(Palette p) {
p.remove(p.getDarkest(2));
p.remove(p.getDarkest(2));
p.remove(p.getDarkest(2));
p.changeSizeMatchingLuminanceSpan(0.25F);
}

Expand All @@ -1900,6 +1901,11 @@ private void darkerPalette(Palette p) {
}

private void darkPalette(Palette p) {
if (p.size() > 25) {
while (p.size() > 6) {
p.reduce();
}
}
p.increaseInner();
p.increaseInner();
p.increaseInner();
Expand Down

0 comments on commit 369c650

Please sign in to comment.