3 puts "AIS_ColorScale::FindColor does not take into account custom colors."
13 vcolorscale cs -range 0 20 5
15 # Set user-defined colors and labels for color scale
16 vcolorscale cs -colors white red green blue1 gray
18 # Check the first interval border color
19 if {[vcolorscale cs -findcolor 0] != "WHITE"} {
20 puts "ERROR: Find color result for the first segment is wrong!"
23 # Check first-second intervals border
24 if {[vcolorscale cs -findcolor 4] != "WHITE"} {
25 puts "ERROR: Find color result for the first segment border is wrong!"
28 # Check the second interval color
29 if {[vcolorscale cs -findcolor 5] != "RED"} {
30 puts "ERROR: Find color result for the second segment is wrong!"
33 # Check the second interval color
34 if {[vcolorscale cs -findcolor 9] != "GREEN"} {
35 puts "ERROR: Find color result for the third segment is wrong!"
38 # Check the last interval border color
39 if {[vcolorscale cs -findcolor 20] != "GRAY"} {
40 puts "ERROR: Find color result for the last segment is wrong!"
43 # Check negative value limits
44 vcolorscale cs -range -5 5 5
46 if {[vcolorscale cs -findcolor -5] != "WHITE"} {
47 puts "ERROR: Find color result for the first segment is wrong!"
50 if {[vcolorscale cs -findcolor 0] != "GREEN"} {
51 puts "ERROR: Find color result for the middle segment is wrong!"
54 if {[vcolorscale cs -findcolor 5] != "GRAY"} {
55 puts "ERROR: Find color result for the last segment is wrong!"