{"id":23112933,"url":"https://github.com/vbfox/coloredprintf","last_synced_at":"2025-07-07T12:08:25.322Z","repository":{"id":52831448,"uuid":"70334433","full_name":"vbfox/ColoredPrintf","owner":"vbfox","description":"F# printf functions but with colors !","archived":false,"fork":false,"pushed_at":"2024-09-05T22:01:28.000Z","size":327,"stargazers_count":48,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T13:07:59.517Z","etag":null,"topics":["color","fsharp","printf"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vbfox.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-08T13:54:58.000Z","updated_at":"2025-01-27T08:39:17.000Z","dependencies_parsed_at":"2024-12-24T03:08:14.845Z","dependency_job_id":"c96428d6-2cc4-4de2-9c87-9fc001e24d3c","html_url":"https://github.com/vbfox/ColoredPrintf","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbfox%2FColoredPrintf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbfox%2FColoredPrintf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbfox%2FColoredPrintf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbfox%2FColoredPrintf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbfox","download_url":"https://codeload.github.com/vbfox/ColoredPrintf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242039716,"owners_count":20061927,"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":["color","fsharp","printf"],"created_at":"2024-12-17T02:21:05.619Z","updated_at":"2025-03-05T14:11:47.167Z","avatar_url":"https://github.com/vbfox.png","language":"F#","readme":"﻿# Colored Printf\n\n![color drops Logo](https://raw.githubusercontent.com/vbfox/ColoredPrintf/master/src/BlackFox.ColoredPrintf/Icon.png)\n\n[![Github Actions Status](https://github.com/vbfox/ColoredPrintf/actions/workflows/main.yml/badge.svg)](https://github.com/vbfox/ColoredPrintf/actions/workflows/main.yml?query=branch%3Amaster)\n[![Nuget Package](https://img.shields.io/nuget/v/BlackFox.ColoredPrintf.svg)](https://www.nuget.org/packages/BlackFox.ColoredPrintf)\n\nThis library provide a replacement to F# `printf` function with color support.\n\nThe syntax to set the color inside the string is `$foreground;background[text]` where both foreground and background\nare optional.\n\nThe supported colors are the one from the [System.ConsoleColor](https://docs.microsoft.com/en-us/dotnet/api/system.consolecolor) enum.\n\n## Examples\n\n```fsharp\n// Change the color of part of a string\ncolorprintfn \"$red[Hello] $white;red[world].\"\n\n// Use sprintf syntax\ncolorprintfn \"Hello $green[%s]: %s\" \"user\" \"Welcome to color!\"\ncolorprintfn \"$white[Progress]: $yellow[%.2f%%] (Eta $yellow[%i] minutes)\" 42.33 5\n\n// Use interpolated strings\nlet life = \"La vie\"\nlet is_ = \"est\"\ncolorprintfn $\"\"\"$white;blue[%s{life} ]$black;white[{is_} ]$white;red[{\"belle\"}]\"\"\"\n\n// Specify the colors from variables\nlet logColor = ConsoleColor.Yellow\ncolorprintfn \"result: $%A[Hello world]\" logColor\ncolorprintfn $\"result: ${logColor}[Hello world]\"\n```\n\nDisplays :\n\n![Demo](https://raw.githubusercontent.com/vbfox/ColoredPrintf/master/doc/demo.png)\n\n## Thanks\n\n* [Newaita icon pack](https://github.com/cbrnix/Newaita) for the base of the icon (License: [CC BY-NC-SA 3.0]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbfox%2Fcoloredprintf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbfox%2Fcoloredprintf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbfox%2Fcoloredprintf/lists"}