Hi Rohit,
Thank you very much for this, so the final code looks something like this
SetDirectory[NotebookDirectory[]];
fileNames = FileNames["*.png"]
colors = {FileNameTake@#,
Splice@DominantColors[Import@#, 5, "NearestHTMLColor"]} & /@
fileNames
padded = PadRight[#, 6, ""] & /@ colors
columnNames = ("Color " <> ToString@#) & /@ Range@5 // Prepend["File"]
results = padded // Prepend@columnNames
Export["dominant colors11.csv", results]
and the output looks like this (as attached).
Again, you really saved me from copying and pasting hundreds of data to excel. Thanks man!
Attachments: