Number: 220
Title: Strange colors from this node-only graph
Submitter: Stephen Mercer
Date: Wed Nov 20 00:10:21 2002
Subsys: Common
Version: 1.8.10
System: x86-Windows-XP
Severity: minor
Problem:
neato -Tpng c:tempgraphdesc.dot -o c:tempblah.png

The above command, when run on the dot input included below, creates a set of nodes where the node titled "CaseSelector" is a funky shade of light pink instead of the purple it is supposed to be. All other nodes are also in incorrect colors, but this is the most obvious. Deleting either or both of the first two nodes "ArraySubset" or "InitializeArray" corrects the problem and all nodes draw in the right colors.
Input:

digraph LVUniverse {
   graph [overlap=false,bgcolor=black,center=true,splines=true,sep=0.1];
   node [fixedsize=true,height=1,width=1,shape=box,style=filled,fillcolor=white];
   edge [constraint=false,style=bold,arrowtail=none];
     ArraySubset [fillcolor="#FF5000",fontcolor="#00FFFF",label="Array Sub"];
     InitializeArray [fillcolor="#FF5400",fontcolor="#00FFFF",label="Initializ"];
     ScanFromString [fillcolor="#FF5800",fontcolor="#00FFFF",label="Scan From"];
     SCCErrorMessagesvi [fillcolor="#FF5C00",fontcolor="#00FFFF",label="SCC Error"];
     OpenVIReference [fillcolor="#FF5C00",fontcolor="#00FFFF",label="Open VI R"];
     CloseFile [fillcolor="#FF6400",fontcolor="#00FFFF",label="Close Fil"];
     Decrement [fillcolor="#FF6800",fontcolor="#00FFFF",label="Decrement"];
     EmptyStringPath [fillcolor="#FF6C00",fontcolor="#00FFFF",label="Empty Str"];
     StringLength [fillcolor="#FF6C00",fontcolor="#00FFFF",label="String Le"];
     NotEqual [fillcolor="#FF7000",fontcolor="#00FFFF",label="Not Equal"];
     CompoundArithmetic [fillcolor="#FF7400",fontcolor="#00FFFF",label="Compound "];
     CloseLVObjectReference [fillcolor="#FF7800",fontcolor="#00FFFF",label="Close LV "];
     Increment [fillcolor="#FF7C00",fontcolor="#00FFFF",label="Increment"];
     Subtract [fillcolor="#FF8000",fontcolor="#00FFFF",label="Subtract"];
     Search1DArray [fillcolor="#FF8000",fontcolor="#00FFFF",label="Search 1D"];
     BooleanTo01 [fillcolor="#FF8400",fontcolor="#00FFFF",label="Boolean T"];
     MatchPattern [fillcolor="#FF8400",fontcolor="#00FFFF",label="Match Pat"];
     Add [fillcolor="#FF9000",fontcolor="#00FFFF",label="Add"];
     Unbundle [fillcolor="#FF9C00",fontcolor="#00FFFF",label="Unbundle"];
     Sequence [fillcolor="#FF9C00",fontcolor="#00FFFF",label="Sequence"];
     StringSubset [fillcolor="#FFA000",fontcolor="#00FFFF",label="String Su"];
     StripPath [fillcolor="#FFB800",fontcolor="#00FFFF",label="Strip Pat"];
     Not [fillcolor="#FFC800",fontcolor="#00FFFF",label="Not"];
     Or [fillcolor="#FFD400",fontcolor="#00FFFF",label="Or"];
     Bundle [fillcolor="#FFDC00",fontcolor="#00FFFF",label="Bundle"];
     BuildPath [fillcolor="#FFDC00",fontcolor="#00FFFF",label="Build Pat"];
     And [fillcolor="#FFEC00",fontcolor="#00FFFF",label="And"];
     BundleByName [fillcolor="#FFEC00",fontcolor="#00FFFF",label="Bundle By"];
     ArraySize [fillcolor="#FFEC00",fontcolor="#00FFFF",label="Array Siz"];
     ConcatenateStrings [fillcolor="#FFFC00",fontcolor="#00FFFF",label="Concatena"];
     Select [fillcolor="#F3FF00",fontcolor="#0CFFFF",label="Select"];
     FormatIntoString [fillcolor="#DFFF00",fontcolor="#20FFFF",label="Format In"];
     FillInErrorInfovi [fillcolor="#DFFF00",fontcolor="#20FFFF",label="Fill In E"];
     PropertyNode [fillcolor="#D3FF00",fontcolor="#2CFFFF",label="Property "];
     WhileLoop [fillcolor="#C3FF00",fontcolor="#3CFFFF",label="WhileLoop"];
     IndexArray [fillcolor="#A7FF00",fontcolor="#58FFFF",label="Index Arr"];
     CallLibraryFunctionNode [fillcolor="#9FFF00",fontcolor="#60FFFF",label="Call Libr"];
     BuildArray [fillcolor="#97FF00",fontcolor="#68FFFF",label="Build Arr"];
     Equal [fillcolor="#63FF00",fontcolor="#9CFFFF",label="Equal?"];
     ForLoop [fillcolor="#00FF10",fontcolor="#FFEFEF",label="ForLoop"];
     UnbundleByName [fillcolor="#00FF28",fontcolor="#FFD7D7",label="Unbundle "];
     CaseSelector [fillcolor="#FC00FF",fontcolor="#030000",label="CaseSelec"];
}
Comments:
[ellson] I think you're hitting the 256 color limitation of the indexed color scheme that is used in GD, originally for GIF images. The colors get used quickly because of anti-aliased font strings. Each new combo of forground and background color uses 6 color indexes.

I was expecting this restriction to have gone with the truecolor png support from gd-2.0.6 that we're using in latest CVS sources, but the effect is still there, so I'm going to leave this problem open for now and I will investigate further.
Owner: *
Status: *