App::sdif::osx_autocolor
sdif -Mosx_autocolor
This is a module for sdif(1) command to set default option according to terminal background color taken by AppleScript. Terminal brightness is caliculated from terminal background RGB values by next equation.
Y = 0.30 * R + 0.59 * G + 0.11 * B
When the result is greater than 0.5, set --LIGHT_SCREEN option, otherwise set --DARK_SCREEN option.
Because these options are not defined in this module, user have to define them somewhere.
If the environment variable BRIGHTNESS is defined, its value is used as a brightness rather than caliculated from terminal color. The value of BRIGHTNESS is in a range of 0 to 100.
BRIGHTNESS
App::sdif::colors
To install App::sdif, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::sdif
CPAN shell
perl -MCPAN -e shell install App::sdif
For more information on module installation, please visit the detailed CPAN module installation guide.