Archived Legacy DynamicHUD
  • Dynamic HUD
  • Import using Gradle
  • Widgets
    • Adding Widgets
      • TextWidget
      • ItemWidget
      • ArmorWidget
    • Creating your own Widget class
    • Widget class
    • WidgetManager
    • WidgetBox
  • Saving and Loading
    • Saving and Loading
    • Changing save file name and directory
  • Moveable Screen
    • AbstractMoveableScreen
    • Default Moveable Screen
    • Using the default Moveable Screen
    • Creating and using your own MoveableScreen class
  • ContextMenu
    • ContextMenu class
    • ContextMenuOptionsProvider interface
    • DoubleInputScreen
    • DataInputScreen
  • Slider Widget
    • Slider
  • SliderWidgetBuilder
  • ColorPicker
    • ColorGradientPicker
      • ColorPickerButton
      • GradientBox
      • GradientSlider
  • Helpers
    • ColorHelper
    • DrawHelper
    • TextureHelper
Powered by GitBook
On this page
  • ColorHelper
  • Methods
  1. Helpers

ColorHelper

Talks about the colorHelper class

ColorHelper

This class provides helper methods for working with colors.

Methods

getColor(int red, int green, int blue)

Returns a color as an integer value given its red, green and blue components.

Parameter
Description

red

The red component of the color

green

The green component of the color

blue

The blue component of the color

Returns: The color as an integer value.

getColor(int red, int green, int blue, int alpha)

Returns a color as an integer value given its red, green, blue and alpha components.

Parameter
Description

red

The red component of the color

green

The green component of the color

blue

The blue component of the color

alpha

The alpha component of the color

Returns: The color as an integer value.

getColorFromInt(int color)

Converts an integer value to a Color object.

Parameter
Description

color

The integer value representing the color

Returns: A Color object representing the given integer value.

getColorFromHue(float hue)

Returns a color as an integer value given its hue.

Parameter
Description

hue

The hue of the color

Returns: The color as an integer value.

ColorToInt(Color color)

Converts a Color object to an integer value.

Parameter
Description

color

The Color object to convert

Returns: The integer representation of the given Color object.

PreviousGradientSliderNextDrawHelper