/// <summary>
        /// Color to use for gizmos.
        /// Returns a color to be used for the specified node with the current debug settings (editor only).
        ///
        /// Version: Since 3.6.1 this method will not handle null nodes
        /// </summary>
        public Color NodeColor(GraphNode node)
        {
            if (showSearchTree && !InSearchTree(node, debugData, debugPathID))
            {
                return(Color.clear);
            }

            Color color;

            if (node.Walkable)
            {
                switch (debugMode)
                {
                case GraphDebugMode.Areas:
                    color = AstarColor.GetAreaColor(node.Area);
                    break;

                case GraphDebugMode.HierarchicalNode:
                    color = AstarColor.GetTagColor((uint)node.HierarchicalNodeIndex);
                    break;

                case GraphDebugMode.Penalty:
                    color = Color.Lerp(AstarColor.ConnectionLowLerp, AstarColor.ConnectionHighLerp,
                                       ((float)node.Penalty - debugFloor) / (debugRoof - debugFloor));
                    break;

                case GraphDebugMode.Tags:
                    color = AstarColor.GetTagColor(node.Tag);
                    break;

                case GraphDebugMode.SolidColor:
                    color = AstarColor.SolidColor;
                    break;

                default:
                    if (debugData == null)
                    {
                        color = AstarColor.SolidColor;
                        break;
                    }

                    PathNode pathNode = debugData.GetPathNode(node);
                    float    value;
                    if (debugMode == GraphDebugMode.G)
                    {
                        value = pathNode.G;
                    }
                    else if (debugMode == GraphDebugMode.H)
                    {
                        value = pathNode.H;
                    }
                    else
                    {
                        // mode == F
                        value = pathNode.F;
                    }

                    color = Color.Lerp(AstarColor.ConnectionLowLerp, AstarColor.ConnectionHighLerp,
                                       (value - debugFloor) / (debugRoof - debugFloor));
                    break;
                }
            }
            else
            {
                color = AstarColor.UnwalkableNode;
            }

            return(color);
        }