Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert a color or an image to grayscale using Faust's method
ResourceFunction["FaustGrayscaleConvert"][image] converts the color space of image to grayscale. | |
ResourceFunction["FaustGrayscaleConvert"][color] converts color specifications of a color directive. |
Convert a color photo to grayscale:
| In[1]:= | ![]() |
| Out[1]= | ![]() |
This shows that the previous output is a grayscale image:
| In[2]:= |
| Out[2]= |
Convert an RGB color object to grayscale:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= |
Convert any color in any color space to grayscale:
| In[5]:= |
| Out[5]= |
Convert a list of colors:
| In[6]:= |
| Out[6]= |
Convert a list of images:
| In[7]:= |
| Out[7]= | ![]() |
Convert a 3D image:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Use Method to specify the initial color conversion performed:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
Use FaustGrayscaleConvert to convert all colors in a plot to grayscale:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
FaustGrayscaleConvert often gives results with a better intensity distribution than ColorConvert[input,"Grayscale"], but takes more time to evaluate:
| In[11]:= |
| Out[11]= | ![]() |
| In[12]:= |
| Out[12]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License