Nearest neighbors of HTML colors as measured by CIE76​
​
As part of my research in rectifying fig (Ficus carica) cultivar morphology with genetic SNP data, it turns out I will need a well-tempered color scale. Here is a small step in that direction - albeit with the human CIE76 color perception metric. Many thanks to Rohit Namjoshi for demonstrating the use of VertexShapeFunction.

In[]:=
HuedVerticesGraph[annotatededges_,vertexsize_,graphwidth_,aspectratio_,graphlayout_]:=Block[​​(*localnames*)​​{},​​(*computation*)​​vsf[width_][pos_,label_,_]:=Inset[Framed[Pane[Spacer[width],{width,width}],Backgroundlabel,FrameStyle{Black,Dashing[{}]}],pos];​​etG=EdgeTaggedGraph[​​annotatededges,​​BaseStyleArrowheads[Medium],​​VertexShapeFunctionvsf[vertexsize],​​GraphLayoutgraphlayout,​​AspectRatioaspectratio,​​ImageSize{graphwidth,Automatic},​​PerformanceGoal"Quality"​​];​​etG​​];
In[]:=
(*packagefile*)​​packageDir=FileNameJoin[{SystemInformation["FrontEnd","UserDocumentsDirectory"],"Mathematica Packages","Least Bridges Graphs"}];​​packageFile=FileNameJoin[{packageDir,"000 Least Bridges Graphs Package.m"}];​​If[!FileExistsQ[packageFile],​​Print[Style["Can't find "<>packageFile,{Bold,Red,18}]],​​Get[packageFile]​​];​​​​(*LeastBridgesGrapharguments*)​​edgeStyleType="plain edges";​​labelEdges=2;​​edgeDistanceSup=∞;​​chatty={False,False,False};​​​​(*HuedVerticesGrapharguments*)​​vertexSize=10;(*printer'spoints*)​​graphWidth=896;​​aspectRatio=1.25;​​graphLayout="LayeredEmbedding";​​​​(*Datainitialization*)​​htmlColors=(If[(First[#]"Aqua")||(First[#]"Fuchsia"),Nothing,#]&/@ColorData["HTML","ColorRules"])[[;;,2]];​​htmlColorsCount=Length[htmlColors];​​edgeDistances=Flatten[Table[Table[{htmlColors[[i]]htmlColors[[j]],ColorDistance[htmlColors[[i]],htmlColors[[j]],DistanceFunction"CIE76"]},{j,i+1,htmlColorsCount}],{i,1,htmlColorsCount-1}],1];​​edgeDistancesCount=Length[edgeDistances];​​​​(*computationandoutput*)​​{classHues,classPartitions,graphEdges}=LeastBridgesGraphEdges[edgeDistances,edgeStyleType,labelEdges,edgeDistanceSup,chatty];​​Print[Column[{Style["Nearest neighbors of HTML colors as measured by CIE76",{Black,14}],HuedVerticesGraph[graphEdges,vertexSize,graphWidth,aspectRatio,graphLayout]},Center,2]];​​​​
Nearest neighbors of HTML colors as measured by CIE76