Android Question Color template for a value scale.

vecino

Well-Known Member
Licensed User
Longtime User
I want to assign to a scale of values from -100 to 100 some colors ranging from white to black.
There are 200 colors/values (-100 to 100), and I can't figure out how to do it.
I want it to start at white, then green, then blue, then yellow, then red and end at black.
(White, green, blue, yellow, red, black).
There should be about 32 shades of each (200/6), rounding up.
Any tricks or tips on how to achieve this?
Thanks.
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
It seems to me that you have described five colour bands, not six. The first starts at white and ends at green; the next starts at green and ends at blue. So for the first band start with white and remove the red and blue components in forty steps; for the second band reduce green to zero while increasing blue in forty steps.

That sounds logical, but I am not sure if it will look attractive.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Maybe you are looking for a HSV bar.

1627964284013.png


There is code that creates such a bar in B4XColorTemplate.
 
Upvote 0
Top