<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<divclass="type-signature"><spanclass="modifiers">public final class </span><spanclass="element-name type-name-label">MapPalette</span>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></span></div>
<divclass="block">Represents the palette that map items use.
<p>
These fields are hee base color ranges. Each entry corresponds to four
colors of varying shades with values entry to entry + 3.</div>
<divclass="col-second even-row-color"><code><ahref="MapPalette.MapColorCache.html"class="type-name-link"title="interface in org.bukkit.map">MapPalette.MapColorCache</a></code></div>
<divclass="col-last even-row-color">
<divclass="block">Holds cached information for matching map colors of a given RBG color.</div>
</div>
</div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<sectionclass="field-summary"id="field-summary">
<h2>Field Summary</h2>
<divclass="caption"><span>Fields</span></div>
<divclass="summary-table three-column-summary">
<divclass="table-header col-first">Modifier and Type</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Color.html"title="class or interface in java.awt"class="external-link">Color</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><ahref="#imageToBytes(java.awt.Image)"class="member-name-link">imageToBytes</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Image.html"title="class or interface in java.awt"class="external-link">Image</a> image)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><ahref="#matchColor(java.awt.Color)"class="member-name-link">matchColor</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Color.html"title="class or interface in java.awt"class="external-link">Color</a> color)</code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/image/BufferedImage.html"title="class or interface in java.awt.image"class="external-link">BufferedImage</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><ahref="#resizeImage(java.awt.Image)"class="member-name-link">resizeImage</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Image.html"title="class or interface in java.awt"class="external-link">Image</a> image)</code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><ahref="#setMapColorCache(org.bukkit.map.MapPalette.MapColorCache)"class="member-name-link">setMapColorCache</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="MapPalette.MapColorCache.html"title="interface in org.bukkit.map">MapPalette.MapColorCache</a> mapColorCache)</code></div>
<divclass="block">Sets the given MapColorCache.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()"title="class or interface in java.lang"class="external-link">clone</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()"title="class or interface in java.lang"class="external-link">finalize</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"title="class or interface in java.lang"class="external-link">toString</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<sectionclass="details">
<ulclass="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<sectionclass="field-details"id="field-detail">
<h2>Field Details</h2>
<ulclass="member-list">
<li>
<sectionclass="detail"id="TRANSPARENT">
<h3>TRANSPARENT</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.TRANSPARENT">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="LIGHT_GREEN">
<h3>LIGHT_GREEN</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.LIGHT_GREEN">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="LIGHT_BROWN">
<h3>LIGHT_BROWN</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.LIGHT_BROWN">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="GRAY_1">
<h3>GRAY_1</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.GRAY_1">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="RED">
<h3>RED</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.RED">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="PALE_BLUE">
<h3>PALE_BLUE</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.PALE_BLUE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="GRAY_2">
<h3>GRAY_2</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.GRAY_2">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="DARK_GREEN">
<h3>DARK_GREEN</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.DARK_GREEN">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="WHITE">
<h3>WHITE</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.WHITE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="LIGHT_GRAY">
<h3>LIGHT_GRAY</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.LIGHT_GRAY">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="BROWN">
<h3>BROWN</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.BROWN">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="DARK_GRAY">
<h3>DARK_GRAY</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.DARK_GRAY">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="BLUE">
<h3>BLUE</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<li><ahref="../../../constant-values.html#org.bukkit.map.MapPalette.BLUE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="DARK_BROWN">
<h3>DARK_BROWN</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/image/BufferedImage.html"title="class or interface in java.awt.image"class="external-link">BufferedImage</a></span> <spanclass="element-name">resizeImage</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Image.html"title="class or interface in java.awt"class="external-link">Image</a> image)</span></div>
<divclass="block">Resize an image to 128x128.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>image</code> - The image to resize.</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public static</span> <spanclass="return-type">@org.jetbrains.annotations.NotNull byte[]</span> <spanclass="element-name">imageToBytes</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Image.html"title="class or interface in java.awt"class="external-link">Image</a> image)</span></div>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
</span><spanclass="modifiers">public static</span> <spanclass="return-type">byte</span> <spanclass="element-name">matchColor</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Color.html"title="class or interface in java.awt"class="external-link">Color</a> color)</span></div>
<divclass="block">Get the index of the closest matching color in the palette to the given
color.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>color</code> - The Color to match.</dd>
<dt>Returns:</dt>
<dd>The index in the palette.</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="getColor(byte)">
<h3>getColor</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html"title="class or interface in java.lang"class="external-link">@Deprecated</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/Color.html"title="class or interface in java.awt"class="external-link">Color</a></span> <spanclass="element-name">getColor</span><wbr><spanclass="parameters">(byte index)</span></div>
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type">void</span> <spanclass="element-name">setMapColorCache</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="MapPalette.MapColorCache.html"title="interface in org.bukkit.map">MapPalette.MapColorCache</a> mapColorCache)</span></div>
<divclass="block">Sets the given MapColorCache.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>mapColorCache</code> - The map color cache to set</dd>