Class DominantColor

    • Method Detail

      • red

        public final Integer red()

        The Red RGB value for a dominant color.

        Returns:
        The Red RGB value for a dominant color.
      • blue

        public final Integer blue()

        The Blue RGB value for a dominant color.

        Returns:
        The Blue RGB value for a dominant color.
      • green

        public final Integer green()

        The Green RGB value for a dominant color.

        Returns:
        The Green RGB value for a dominant color.
      • hexCode

        public final String hexCode()

        The Hex code equivalent of the RGB values for a dominant color.

        Returns:
        The Hex code equivalent of the RGB values for a dominant color.
      • cssColor

        public final String cssColor()

        The CSS color name of a dominant color.

        Returns:
        The CSS color name of a dominant color.
      • simplifiedColor

        public final String simplifiedColor()

        One of 12 simplified color names applied to a dominant color.

        Returns:
        One of 12 simplified color names applied to a dominant color.
      • pixelPercent

        public final Float pixelPercent()

        The percentage of image pixels that have a given dominant color.

        Returns:
        The percentage of image pixels that have a given dominant color.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)