4D Chart v12CT Color to index | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
                    
                        
    
    
                         | 
                
                    
                         
    4D Chart v12
 
CT Color to index 
 
        
 | 
                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CT Color to index ( color ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| color | Longint | 
             
         | 
        Color value (internal to 4D Chart) | |||||
| Function result | Integer | 
             
         | 
        Index of the closest color in the 4D palette | |||||
CT Color to index returns the index of the color closest to color on the 4D color palette.
For instance, if a particular shade of blue is specified, CT Color to index returns the closest shade of blue in the 4D palette. Colors on the 4D palette are numbered from 1 to 256.
This example places the palette index of the color closest to red in the vColor variable:
 vColor:=CT Color to index(CT RGB to color(56683;2242;1698))
	Product:  4D Chart
	Theme:  CT Utilities
	Number:  
        14580
        
        
        
	
	Created:  4D Chart 1
CT COLOR TO RGB
CT Index to color
CT RGB to color