Skip to content

Dracosomething/Grayifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Grayifier

Powershell script that takes in an array of hex color codes and converts them into their grayscale version using multiple methods.

Download instructions

Download the calculator.ps1 file.

use guide

To run the script use go into it's directory and run the following command.

./calculator.ps1 -colors <# <enter hex color here> #> -useAll

options

The script has a multitude of options.

-colors

accepts an array of strings, these are the colors that the script will parse.

-useAverage

flag to use avarage method. This uses the following formula: $(Red + Green + Blue) / 3$

-useLuminosity

flag to use luminosity method. This uses the following formula: $(Red * 0.3) + (Green * 0.59) + (Blue * 0.11)$

-useDesaturation

flag to use desaturation method. This uses the following formula: $(Max(Red, Green, Blue) + Min(Red, Green, Blue)) / 2$

-useDecompositionMax

flag to use the decomposition method and grab the highest value. This uses the following formula: $Max(Red, Green, Blue)$

-useDecompositionMin

flag to use the decomposition method and grab the lowest value. This uses the following formula: $Min(Red, Green, Blue)$

-useAll

flag that tells the program to do all methods.

About

Powershell script that takes in an array of hex color codes and converts them into their grayscale version using multiple methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors