SeekBar with RGBA color gradients.
Functions
- InitializeSeekBars(AndroidViewComponent arrangement)
- Initializes the SeekBars within a specific arrangement.
- GetCurrentColor()
- Returns the current color.
- ResetColor()
- Resets to the default color (black).
- GetRedComponent()
- Returns the red component of the current color.
- GetGreenComponent()
- Returns the green component of the current color.
- GetBlueComponent()
- Returns the blue component of the current color.
- GetAlphaComponent()
- Returns the alpha component of the current color.
- SetInitialColor(int color)
- Sets the initial color.
- SaveCurrentColor()
- Saves the current color to the saved colors list.
- GetSavedColor(int index)
- Returns the saved color at the specified index.
- SwapRedAndBlue()
- Swaps the red and blue components of the current color.
- SetBackgroundColor(AndroidViewComponent component)
- Sets the background color of a specific component.
- SetTextColor(AndroidViewComponent component)
- Sets the text color of a specific component.
- UndoColorChange()
- Undoes the last color change.
- RedoColorChange()
- Redoes the last undone color change.
- SaveColorPalette()
- Saves the current color palette.
- LoadColorPalette(String filePath)
- Loads a color palette from a CSV file.
- ClearSavedColors()
- Clears the saved colors list.
- GetSavedColorsCount()
- Returns the number of saved colors.
- SetSeekBarVisibility(boolean visible)
- Shows or hides all SeekBars.
- AdjustBrightness(int percent)
- Adjusts the brightness of the current color by a percentage.
- AdjustSaturation(int percent)
- Adjusts the saturation of the current color by a percentage.
- RemoveSavedColor(int index)
- Removes a saved color from the list by index.
- ExportColorPalette(String fileName)
- Exports the saved color palette as a CSV file.
- ShareColorPalette()
- Shares the saved color palette as text.
- GetCurrentColorHex()
- Returns the current color as a hexadecimal string.
- GetCurrentColorCMYK()
- Returns the current color as a CMYK string.
- GetCurrentColorHSV()
- Returns the current color as an HSV string.
- GetCurrentColorHSL()
- Returns the current color as an HSL string.
Events
- ColorChanged(int color)
- Triggered when the color is changed.
- Parameter:
color
(int) - The new color.
- LoadPaletteFailed(String errorMessage)
- Triggered when loading the color palette fails.
- Parameter:
errorMessage
(String) - The error message.
- ExportSuccess(String filePath)
- Triggered when the color palette is successfully exported.
- Parameter:
filePath
(String) - The path of the exported file.
- ExportFailure(String errorMessage)
- Triggered when there is an error exporting the color palette.
- Parameter:
errorMessage
(String) - The error message.
Example Video:
aia project:
RGBASeekbarTest.aia (65.5 KB)
Extension:
JoeDevRGBASeekBars.aix (18.8 KB)
Thanks.