[Free] ThColorPicker - Allowing users to select colors with options for alpha, hex, and preview.

🧩 ThColorPicker

An extension for MIT App Inventor 2.
A color picker component developed by TechHamara using Fast, allowing users to select colors with options for alpha, hex, and preview.
Telegram | GitHub
Blogger | YouTube
Find More Extension
Terms & Conditions

:memo: Specifications


:package: Package: io.th.thcolorpicker
:floppy_disk: Size: 28.81 KB
:gear: Version: 1.0
:iphone: Minimum API Level: 21
:date: Updated On: 2025-06-09T18:30:00Z
:computer: Built & documented using: FAST v2.8.4
:arrow_down: Download Aix here
:arrow_down: Download aia, apk on GitHub

Demo

ThColorPickerblocks.png

Screenshot_2025-07-05-21-55-26-940_appinventor.ai_Techhamara91.Color_Picker.jpg

Screenshot_2025-07-05-21-55-38-192_appinventor.ai_Techhamara91.Color_Picker.jpg

Screenshot_2025-07-05-21-56-02-538_appinventor.ai_Techhamara91.Color_Picker.jpg

Screenshot_2025-07-05-21-55-58-150_appinventor.ai_Techhamara91.Color_Picker.jpg

0487ec96-214d-4d69-bb4a-41904c90ec49
6ba9f120-6aa9-4936-a3a4-a97c058ee13f

Blocks

NoneSelected_Event
DialogDismissed_Event
ColorSelected_Event


ColorFromHSV_Method
ColorFromARGB_Method
ShowColorPicker_Method
SelectedColorHSV_Method
SelectedColorHex_Method
SelectedColorARGB_Method
SelectedColor_Method
InitialColor_Method


DefaultColor_Set_Property
DefaultColor_Get_Property
ShowPreview_Set_Property
ShowPreview_Get_Property
SelectNoneButtonText_Set_Property
SelectNoneButtonText_Get_Property

Events:

ThColorPicker has total 3 events.

ColorSelected

Event raised when a color is selected

Parameter Type
color number

DialogDismissed

Event raised when the color picker dialog is dismissed

NoneSelected

Event raised when the 'Select None' button is clicked

Methods:

ThColorPicker has total 8 methods.

ShowColorPicker

Shows the color picker dialog

InitialColor

Sets the initial color of the color picker

Parameter Type
color number

SelectedColor

Gets the currently selected color

  • Return type: number

SelectedColorHex

Gets the hex code of the selected color

  • Return type: text

SelectedColorARGB

Gets the ARGB components of the selected color

  • Return type: any

SelectedColorHSV

Gets the HSV components of the selected color

  • Return type: any

ColorFromHSV

Sets a color from HSV values

Parameter Type
hue number
saturation number
value number

ColorFromARGB

Sets a color from ARGB values

Parameter Type
alpha number
red number
green number
blue number

Setters:

ThColorPicker has total 3 setter properties.

ShowPreview

Sets whether to show the color preview

  • Input type: boolean

SelectNoneButtonText

Sets the text for the 'Select None' button

  • Input type: text

DefaultColor

Sets the default color to use when 'Select None' is clicked

  • Input type: number

Getters:

ThColorPicker has total 3 getter properties.

ShowPreview

Sets whether to show the color preview

  • Return type: boolean

SelectNoneButtonText

Sets the text for the 'Select None' button

  • Return type: text

DefaultColor

Sets the default color to use when 'Select None' is clicked

  • Return type: number

Feel free to contact us any quarry or suggestions.

@TechHamara

Library Used

Thank you martin-stone for your awesome library

2 Likes

What colour number does it return, 32 bit or 64 bit ?

ref

The HSV-Alpha Color Picker Android library by Martin Stone returns 32-bit ARGB color values, not 64-bit.

:white_check_mark: Details:

The color values are returned in int format, which in Java is a 32-bit signed integer.

AARRGGBB format:

8 bits for Alpha (transparency)

8 bits for Red

8 bits for Green

8 bits for Blue

Example:

If a color is fully opaque red, it would return:

0xFFFF0000

Which is:

Alpha: FF (255)

Red: FF (255)

Green: 00 (0)

Blue: 00 (0)

Source Reference:

The method getColor() in AlphaColorPicker.java returns:

return Color.HSVToColor(alpha, hsv);

And Color.HSVToColor() returns an int (32-bit).

:white_check_mark: Conclusion:

The color number returned by this library is in 32-bit ARGB (int) format.

So RED (255,0,0) would return -65536 ?

image

You are right
Some functions return 64 bit colour number.