歌代 和正 (Kaz Utashiro)
and 3 contributors

NAME

App::sdif::osx_autocolor

SYNOPSIS

sdif -Mosx_autocolor

CAUTION

This module is moved to App::sdif::autocolor::Apple_Terminal and called from App::sdif::autocolor interface module. Will be removed in the future.

DESCRIPTION

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. Those are defined as --green and dark-green respectively by default. You can override them in your ~/.sdifrc.

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.

SEE ALSO

App::sdif::colors