Class ColorFunctions

java.lang.Object
io.trino.operator.scalar.ColorFunctions

public final class ColorFunctions extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.airlift.slice.Slice
    bar(double percent, long width)
     
    static io.airlift.slice.Slice
    bar(double percent, long width, long lowColor, long highColor)
     
    static long
    color(double value, double low, double high, long lowColor, long highColor)
    Interpolate a color between lowColor and highColor based the provided value
    static long
    color(double fraction, long lowColor, long highColor)
    Interpolate a color between lowColor and highColor based on the provided value
    static long
    color(io.airlift.slice.Slice color)
     
    static io.airlift.slice.Slice
    render(boolean value)
     
    static io.airlift.slice.Slice
    render(double value, long color)
     
    static io.airlift.slice.Slice
    render(long value, long color)
     
    static io.airlift.slice.Slice
    render(io.airlift.slice.Slice value, long color)
     
    static long
    rgb(long red, long green, long blue)
     

    Methods inherited from class java.lang.Object

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

    • color

      public static long color(io.airlift.slice.Slice color)
    • rgb

      public static long rgb(long red, long green, long blue)
    • color

      public static long color(double value, double low, double high, long lowColor, long highColor)
      Interpolate a color between lowColor and highColor based the provided value

      The value is truncated to the range [low, high] if it's outside. Color must be a valid rgb value of the form #rgb

    • color

      public static long color(double fraction, long lowColor, long highColor)
      Interpolate a color between lowColor and highColor based on the provided value

      The value is truncated to the range [0, 1] if necessary Color must be a valid rgb value of the form #rgb

    • render

      public static io.airlift.slice.Slice render(io.airlift.slice.Slice value, long color)
    • render

      public static io.airlift.slice.Slice render(long value, long color)
    • render

      public static io.airlift.slice.Slice render(double value, long color)
    • render

      public static io.airlift.slice.Slice render(boolean value)
    • bar

      public static io.airlift.slice.Slice bar(double percent, long width)
    • bar

      public static io.airlift.slice.Slice bar(double percent, long width, long lowColor, long highColor)