Is it possible to pipe(afterthought apply function) with options?
Because currying is not performed automatically. But you can do the following:
Image@hexToRGB["#99c361"] // DominantColors[#, 1, "HexRGBColor"] &
You can define an operator form for DominantColors
by modifying its definition:
Unprotect[DominantColors]
DominantColors[s_String] := DominantColors[#, 1, s] &;
Protect[DominantColors];
A better/safer alternative is to define your own function with its operator form that works like the function DominantColors
:
ClearAll[dominantColors]
dominantColors[a__, o : OptionsPattern[DominantColors]] := DominantColors[a, o]
dominantColors[s_String] := dominantColors[#, 1, s] &
"#99c361" // hexToRGB // Image // dominantColors["HexRGBColor"] // First
"#99c361"
First @ dominantColors["HexRGBColor"] @ Image @ hexToRGB @ "#99c361"
"#99c361"