SeslColorPicker

SeslColorPicker is a widget for selecting a color.

It consists of a color spectrum view, a color swatch view, a gradient color seek bar for saturation, an opacity seek bar, and input fields for HEX and RGB color values. It also displays a list of recently used colors.

The picker can operate in two modes, selectable via tabs:

  • Spectrum Tab (Default): Allows color selection from a continuous spectrum using SeslColorSpectrumView and a saturation seek bar.
  • Swatch Tab: Allows color selection from a predefined set of swatches using SeslColorSwatchView.

Constructors

Link copied to clipboard
constructor(@NonNull context: @NonNull Context, @Nullable attributeSet: @Nullable AttributeSet)

Types

Link copied to clipboard
Link copied to clipboard
Interface definition for a callback to be invoked when the eye dropper tool is clicked by the user.
Link copied to clipboard
open class PickedColor
Represents the currently selected color in the picker.
Link copied to clipboard
annotation class PickerMode

Functions

Link copied to clipboard
Link copied to clipboard
@NonNull
open fun getRecentColorInfo(): @NonNull SeslRecentColorInfo
Retrieves the SeslRecentColorInfo object associated with this color picker.
Link copied to clipboard
open fun initOpacitySeekBar(enabled: Boolean)
Link copied to clipboard
Checks if the current color change was initiated by the user.
Link copied to clipboard
Saves the currently selected color to the list of recent colors.
Link copied to clipboard
open fun setEyeDropperDisable(disable: Boolean)
Disables or enables the eye dropper tool.
Link copied to clipboard
open fun setOnColorChangedListener(@Nullable listener: @Nullable SeslColorPicker.OnColorChangedListener)
Sets a listener to be notified when the selected color changes.
Link copied to clipboard
open fun setOnEyeDropperListener(@Nullable listener: @Nullable SeslColorPicker.OnEyeDropperListener)
Sets the listener to be invoked when the eye dropper icon is clicked.
Link copied to clipboard
Configures the ColorPicker to only display the spectrum view.
Link copied to clipboard
open fun setOpacityBarEnabled(enabled: Boolean)
Enables or disables the opacity seek bar.
Link copied to clipboard
Link copied to clipboard