{"id":25456830,"url":"https://github.com/szaghi/face","last_synced_at":"2026-02-18T11:06:35.616Z","repository":{"id":13042908,"uuid":"73397237","full_name":"szaghi/FACE","owner":"szaghi","description":"Fortran Ansi Colors (and Styles) Environment","archived":false,"fork":false,"pushed_at":"2023-04-18T13:21:14.000Z","size":954,"stargazers_count":39,"open_issues_count":3,"forks_count":15,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-12T18:54:38.920Z","etag":null,"topics":["ansi-colors","fortran","oop"],"latest_commit_sha":null,"homepage":null,"language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szaghi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.bsd-2.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-10T15:54:28.000Z","updated_at":"2023-10-10T20:15:38.000Z","dependencies_parsed_at":"2022-08-07T07:00:57.745Z","dependency_job_id":"d52de4c3-b7b9-40f0-b3a4-a24868b988d2","html_url":"https://github.com/szaghi/FACE","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFACE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFACE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFACE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szaghi%2FFACE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szaghi","download_url":"https://codeload.github.com/szaghi/FACE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239394685,"owners_count":19631122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi-colors","fortran","oop"],"created_at":"2025-02-18T01:51:25.332Z","updated_at":"2026-02-18T11:06:35.610Z","avatar_url":"https://github.com/szaghi.png","language":"Fortran","readme":"# FACE — Fortran Ansi Colors and Styles Environment\n\nA KISS pure Fortran library for easy *colorizing* and *stylizing* strings with ANSI escape codes.\n\n- Pure Fortran (KISS), Fortran 2008+ standard compliant;\n- Tiny — just one function covers everything;\n- Free and Open Source, multi-licensed.\n\n**[Documentation](https://szaghi.github.io/FACE/)** | **[API Reference](https://szaghi.github.io/FACE/api/)**\n\n---\n\n## Copyrights\n\nFACE is distributed under a multi-licensing system:\n\n- **FOSS projects**: [GPL v3](http://www.gnu.org/licenses/gpl-3.0.html)\n- **Closed source / commercial**: [BSD 2-Clause](http://opensource.org/licenses/BSD-2-Clause), [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause), or [MIT](http://opensource.org/licenses/MIT)\n\nAnyone interested in using, developing, or contributing to FACE is welcome — pick the license that best fits your needs.\n---\n\n## A taste of FACE\n\n```fortran\nuse face\nprint '(A)', colorize('Hello', color_fg='red')//colorize(' World', color_fg='blue', style='underline_on')\n```\n\n---\n\n## Usage\n\nFACE exposes only 3 procedures:\n\n1. `colorize` — the main function;\n2. `colors_samples` — prints a sample of all available colors to standard output;\n3. `styles_samples` — prints a sample of all available styles to standard output.\n\n```fortran\nuse face\ncharacter(len=:), allocatable :: error_message\n\nerror_message = colorize('error:', color_fg='red', style='underline_on')//' file not found!'\n\nprint '(A)', error_message\nprint '(A)', colorize('suggestion: check your configuration', color_fg='blue')\n\ncall colors_samples ! print samples of all colors available\ncall styles_samples ! print samples of all styles available\n```\n\n### colorize\n\n`colorize` returns an allocatable character with the requested foreground color, background color, and style. All arguments except `string` are optional.\n\n```fortran\npure function colorize(string, color_fg, color_bg, style) result(colorized)\n  character(len=*), intent(in)           :: string    ! Input string.\n  character(len=*), intent(in), optional :: color_fg  ! Foreground color definition.\n  character(len=*), intent(in), optional :: color_bg  ! Background color definition.\n  character(len=*), intent(in), optional :: style     ! Style definition.\n  character(len=:), allocatable          :: colorized ! Colorized string.\nend function colorize\n```\n\n\u003e Colors and style definitions are case **insensitive**. No warning is returned for unrecognized values — the color or style is simply not applied.\n\n## Available Colors and Styles\n\n![samples](docs/samples.png)\n\n---\n\n## Install\n\n### FPM\n\n```bash\nfpm build\nfpm test\n```\n\nOr add FACE as a dependency in your `fpm.toml`:\n\n```toml\n[dependencies]\nFACE = { git = \"https://github.com/szaghi/FACE\" }\n```\n\n### CMake\n\n```bash\ncmake -S . -B build\ncmake --build build\ncmake --install build\n```\n\n### Install script\n\nFACE ships a bash script (`install.sh`, downloadable from the [latest release](https://github.com/szaghi/FACE/releases/latest)) that automates download and build:\n\n```shell\ninstall.sh --download git --build cmake\n```\n\nSupported download methods: `git`, `wget`. Supported build systems: `fobis`, `make`, `cmake`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszaghi%2Fface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszaghi%2Fface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszaghi%2Fface/lists"}