4D v16

SVG_Color_from_index

Home

 
4D v16
SVG_Color_from_index

SVG_Color_from_index 


 

SVG_Color_from_index ( index ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
index  Lange Ganzzahl in Number of color
Funktionsergebnis  Textfeld in Color designated by index

The SVG_Color_from_index returns the SVG color matching the 4D color specified in the index parameter.

The index parameter designates a number in the 4D color palette, where colors are numbered from 1 to 256. For more information about this point, refer to the description of the 4D OBJECT SET COLOR command.

 In this example, we recreate the 4D color palette:

 $Dom_svg:=SVG_New
 $Lon_line:=0
 For($Lon_ii;0;15;1)
    $Lon_column:=0
    For($Lon_i;1;16;1)
       $Txt_color:=SVG_Color_from_index(($Lon_ii*16)+$Lon_i)
       $Dom_rect:=SVG_New_rect($Dom_svg;$Lon_column;
       $Lon_line;11;11;0;0;"white";$Txt_color)
       $Lon_column:=$Lon_column+11
    End for
    $Lon_line:=$Lon_line+11
 End for
 SVGTool_SHOW_IN_VIEWER($Dom_svg)



Siehe auch 

SVG_Color_RGB_from_long

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: Colors and Gradients
Nummer: 65873

 
GESCHICHTE 

Erstellt: 4D v13

 
ARTIKELVERWENDUNG

4D SVG ( 4D v16)