Package net.kyori.adventure.util
Interface RGBLike
- All Known Subinterfaces:
ARGBLike
,ShadowColor
,TextColor
- All Known Implementing Classes:
NamedTextColor
public interface RGBLike
Something that can provide red, green, and blue colour components.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull HSVLike
asHSV()
Converts the color represented by this RGBLike to the HSV color space.@org.jetbrains.annotations.Range(from=0L, to=255L) int
blue()
Gets the blue component.@org.jetbrains.annotations.Range(from=0L, to=255L) int
green()
Gets the green component.@org.jetbrains.annotations.Range(from=0L, to=255L) int
red()
Gets the red component.
-
Method Details
-
red
@org.jetbrains.annotations.Range(from=0L, to=255L) int red()Gets the red component.- Returns:
- the red component
- Since:
- 4.0.0
-
green
@org.jetbrains.annotations.Range(from=0L, to=255L) int green()Gets the green component.- Returns:
- the green component
- Since:
- 4.0.0
-
blue
@org.jetbrains.annotations.Range(from=0L, to=255L) int blue()Gets the blue component.- Returns:
- the blue component
- Since:
- 4.0.0
-
asHSV
Converts the color represented by this RGBLike to the HSV color space.- Returns:
- an HSVLike representing this RGBLike in the HSV color space
- Since:
- 4.6.0
-