Class ColorHelper

java.lang.Object
petrolpark.mc.library.util.ColorHelper

public class ColorHelper extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<net.createmod.catnip.theme.Color>
     
    static final com.mojang.serialization.Codec<Integer>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final int
    copyAlpha(int rgb, int a)
     
    static final net.minecraft.world.item.DyeColor
    getColor(net.minecraft.world.entity.LivingEntity entity, boolean secondary)
     
    static final boolean
     
    static final double
    linearToSrgb(double c)
     
    static final int
    opaque(int argb)
     
    static final void
    refreshChunkColors(net.minecraft.world.level.ChunkPos centerPos)
     
    static final void
    setColor(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.DyeColor color, boolean secondary)
     
    static final double
    srgbToLinear(double c)
     
    static final net.minecraft.world.phys.Vec3
    toOKLabVec(int argb)
     
    static final int
    toRGB(net.minecraft.world.phys.Vec3 OKLabVec)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<net.createmod.catnip.theme.Color> CODEC
    • INT_CODEC

      public static final com.mojang.serialization.Codec<Integer> INT_CODEC
  • Constructor Details

    • ColorHelper

      public ColorHelper()
  • Method Details

    • isFullyTransparent

      public static final boolean isFullyTransparent(int argb)
    • opaque

      public static final int opaque(int argb)
    • copyAlpha

      public static final int copyAlpha(int rgb, int a)
    • toOKLabVec

      public static final net.minecraft.world.phys.Vec3 toOKLabVec(int argb)
    • srgbToLinear

      public static final double srgbToLinear(double c)
    • toRGB

      public static final int toRGB(net.minecraft.world.phys.Vec3 OKLabVec)
    • linearToSrgb

      public static final double linearToSrgb(double c)
    • getColor

      @Nullable public static final net.minecraft.world.item.DyeColor getColor(net.minecraft.world.entity.LivingEntity entity, boolean secondary)
    • setColor

      public static final void setColor(net.minecraft.world.entity.LivingEntity entity, @Nullable net.minecraft.world.item.DyeColor color, boolean secondary)
    • refreshChunkColors

      public static final void refreshChunkColors(net.minecraft.world.level.ChunkPos centerPos)