Skip to main content
Solved

database value for color selector

  • December 21, 2023
  • 8 replies
  • 118 views

Forum|alt.badge.img+3

Hi guys,

I’m using color selector as a control for a domain and I’m having trouble understanding what the database output means.

I saved this color:
 

and its being saved as this int:
 

how do I get the RGB value from this?

Best answer by Freddy

Anne Buit wrote:

When stored as an integer, the value represents the ARGB color space.

More info here:

Color Picker for Thinkwise Software Factory | Thinkwise Community

if the following function works could store colors to be used in custom html/svg

 

https://stackoverflow.com/questions/23175015/getting-rgbr-g-b-from-argb-integer-sql
 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

8 replies

Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 528 replies
  • December 21, 2023

According to the docs it’s a HEX, however your code doesn’t convert to the Azure color.

https://docs.thinkwisesoftware.com/docs/user/universal_controls#color-picker

so curious also.


Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 637 replies
  • December 21, 2023

When stored as an integer, the value represents the ARGB color space.

More info here:

Color Picker for Thinkwise Software Factory | Thinkwise Community


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 528 replies
  • Answer
  • December 21, 2023
Anne Buit wrote:

When stored as an integer, the value represents the ARGB color space.

More info here:

Color Picker for Thinkwise Software Factory | Thinkwise Community

if the following function works could store colors to be used in custom html/svg

 

https://stackoverflow.com/questions/23175015/getting-rgbr-g-b-from-argb-integer-sql
 


Forum|alt.badge.img+3
  • Author
  • Vanguard
  • 19 replies
  • December 22, 2023

Thanks for the quick replies, guys; this does fix my issue.


Forum|alt.badge.img+3
  • Author
  • Vanguard
  • 19 replies
  • December 22, 2023

Okay, i’ve tried the functions in stack overflow link and read the information provided in the links and I’m still not getting the right RGB value.

@Freddy @Anne Buit 


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 528 replies
  • December 22, 2023
Jaycee_C wrote:

Okay, i’ve tried the functions in stack overflow link and read the information provided in the links and I’m still not getting the right RGB value.

@Freddy @Anne Buit 

Seems to work. 

 

 


Forum|alt.badge.img+3
  • Author
  • Vanguard
  • 19 replies
  • December 22, 2023

tried it again and it works!


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 528 replies
  • December 22, 2023
Jaycee_C wrote:

tried it again and it works!

 

You can also do it directly in a select. 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings