diff options
Diffstat (limited to 'src/main/kotlin/util/colorconversion.kt')
-rw-r--r-- | src/main/kotlin/util/colorconversion.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/util/colorconversion.kt b/src/main/kotlin/util/colorconversion.kt new file mode 100644 index 0000000..d7a5dad --- /dev/null +++ b/src/main/kotlin/util/colorconversion.kt @@ -0,0 +1,13 @@ + + +package moe.nea.firmament.util + +import net.minecraft.text.TextColor +import net.minecraft.util.DyeColor + +fun DyeColor.toShedaniel(): me.shedaniel.math.Color = + me.shedaniel.math.Color.ofOpaque(this.signColor) + +fun DyeColor.toTextColor(): TextColor = + TextColor.fromRgb(this.signColor) + |