NAME Role::TinyCommons::TermAttr::Color - Determine color depth and whether to use color or not VERSION This document describes version 0.001 of Role::TinyCommons::TermAttr::Color (from Perl distribution Role-TinyCommons-TermAttr-Color), released on 2020-06-05. DESCRIPTION PROVIDED METHODS termattr_use_color Try to determine whether colors should be used. First will check NO_COLOR environment variable: if it exists then we should not use colors. Then check the COLOR environment variable: if it's false then color should not be used, if it's true then color should be used. Then check the COLOR_DEPTH environment variable: if it's true (not 0) then color should be used. Lastly check if running interactively. termattr_color_depth Try to determine the terminal's color depth. ENVIRONMENT COLOR COLOR_DEPTH NO_COLOR HOMEPAGE Please visit the project's homepage at . SOURCE Source repository is at . BUGS Please report any bugs or feature requests on the bugtracker website When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. SEE ALSO Role::TinyCommons Term::App::Role::Attrs, an earlier project, Moo::Role, and currently more complete version. AUTHOR perlancar COPYRIGHT AND LICENSE This software is copyright (c) 2020 by perlancar@cpan.org. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.