Add minecraft colors to RGBAColor
This commit is contained in:
parent
37c7bc3c77
commit
ad119cdb0b
@ -4,7 +4,7 @@ kotlin.code.style=official
|
||||
specifyKotlinAsDependency=false
|
||||
|
||||
projectGroup=ru.dbotthepony.kommons
|
||||
projectVersion=2.9.12
|
||||
projectVersion=2.9.13
|
||||
|
||||
guavaDepVersion=33.0.0
|
||||
gsonDepVersion=2.8.9
|
||||
|
@ -204,6 +204,18 @@ class RGBAColor(red: Float, green: Float, blue: Float, alpha: Float = 1f) : IStr
|
||||
@JvmField val HALF_TRANSPARENT = RGBAColor(1f, 1f, 1f, 0.5f)
|
||||
@JvmField val REDDISH = RGBAColor(1f, 0.4f, 0.4f)
|
||||
|
||||
@JvmField val DARK_BLUE = rgb(170)
|
||||
@JvmField val DARK_GREEN = rgb(43520)
|
||||
@JvmField val DARK_AQUA = rgb(43690)
|
||||
@JvmField val DARK_RED = rgb(11141120)
|
||||
@JvmField val DARK_PURPLE = rgb(11141290)
|
||||
@JvmField val GOLD = rgb(16755200)
|
||||
@JvmField val DARK_GRAY = rgb(5592405)
|
||||
@JvmField val BLUE = rgb(5592575)
|
||||
@JvmField val AQUA = rgb(5636095)
|
||||
@JvmField val LIGHT_PURPLE = rgb(16733695)
|
||||
@JvmField val YELLOW = rgb(16777045)
|
||||
|
||||
fun rgb(color: Int): RGBAColor {
|
||||
val r = (color and 0xFF0000 ushr 16) / 255f
|
||||
val g = (color and 0xFF00 ushr 8) / 255f
|
||||
|
Loading…
Reference in New Issue
Block a user