Class Color
java.lang.Object
com.github.retrooper.packetevents.protocol.color.Color
- All Implemented Interfaces:
net.kyori.adventure.util.RGBLike
- Direct Known Subclasses:
AlphaColor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionColor(@org.jetbrains.annotations.Range(from=0L, to=1L) float red, @org.jetbrains.annotations.Range(from=0L, to=1L) float green, @org.jetbrains.annotations.Range(from=0L, to=1L) float blue) Color(@org.jetbrains.annotations.Range(from=0L, to=255L) int red, @org.jetbrains.annotations.Range(from=0L, to=255L) int green, @org.jetbrains.annotations.Range(from=0L, to=255L) int blue) Color(int rgb) -
Method Summary
Modifier and TypeMethodDescriptionintasRGB()@org.jetbrains.annotations.Range(from=0L, to=255L) intblue()static Colordecode(NBT nbt, ClientVersion version) static NBTencode(Color color, ClientVersion version) @org.jetbrains.annotations.Range(from=0L, to=255L) intgreen()static Colorread(PacketWrapper<?> wrapper) @org.jetbrains.annotations.Range(from=0L, to=255L) intred()@NotNull ColorwithBlue(@org.jetbrains.annotations.Range(from=0L, to=255L) int blue) @NotNull ColorwithGreen(@org.jetbrains.annotations.Range(from=0L, to=255L) int green) @NotNull ColorwithRed(@org.jetbrains.annotations.Range(from=0L, to=255L) int red) static voidwrite(PacketWrapper<?> wrapper, Color color) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.util.RGBLike
asHSV
-
Field Details
-
BIT_MASK
protected static final int BIT_MASK- See Also:
-
red
protected final int red -
green
protected final int green -
blue
protected final int blue
-
-
Constructor Details
-
Color
public Color(@org.jetbrains.annotations.Range(from=0L, to=255L) int red, @org.jetbrains.annotations.Range(from=0L, to=255L) int green, @org.jetbrains.annotations.Range(from=0L, to=255L) int blue) -
Color
public Color(@org.jetbrains.annotations.Range(from=0L, to=1L) float red, @org.jetbrains.annotations.Range(from=0L, to=1L) float green, @org.jetbrains.annotations.Range(from=0L, to=1L) float blue) -
Color
public Color(int rgb)
-
-
Method Details
-
read
-
write
-
decode
-
encode
-
withRed
-
withGreen
@NotNull public @NotNull Color withGreen(@org.jetbrains.annotations.Range(from=0L, to=255L) int green) -
withBlue
@NotNull public @NotNull Color withBlue(@org.jetbrains.annotations.Range(from=0L, to=255L) int blue) -
asRGB
public int asRGB() -
red
public @org.jetbrains.annotations.Range(from=0L, to=255L) int red()- Specified by:
redin interfacenet.kyori.adventure.util.RGBLike
-
green
public @org.jetbrains.annotations.Range(from=0L, to=255L) int green()- Specified by:
greenin interfacenet.kyori.adventure.util.RGBLike
-
blue
public @org.jetbrains.annotations.Range(from=0L, to=255L) int blue()- Specified by:
bluein interfacenet.kyori.adventure.util.RGBLike
-