Solved

database value for color selector

  • 21 December 2023
  • 8 replies
  • 99 views

Userlevel 3
Badge +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?

icon

Best answer by Freddy 21 December 2023, 23:04

View original

This topic has been closed for comments

8 replies

Userlevel 5
Badge +16

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.

Userlevel 7
Badge +5

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

More info here:

Color Picker for Thinkwise Software Factory | Thinkwise Community

Userlevel 5
Badge +16

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
 

Userlevel 3
Badge +3

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

Userlevel 3
Badge +3

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 

Userlevel 5
Badge +16

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. 

 

 

Userlevel 3
Badge +3

tried it again and it works!

Userlevel 5
Badge +16

tried it again and it works!

 

You can also do it directly in a select.