{"id":19388449,"url":"https://github.com/spacingbat3/kolor","last_synced_at":"2025-04-23T23:31:40.463Z","repository":{"id":57161818,"uuid":"447368226","full_name":"SpacingBat3/kolor","owner":"SpacingBat3","description":"A simple Node.js module to add \"kolors\" to your console. Now being \"strongly typed\"!","archived":false,"fork":false,"pushed_at":"2025-01-28T13:28:15.000Z","size":233,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:32:45.353Z","etag":null,"topics":["chalk","chalkjs","colors","colorsjs","console","library","logging","module","nodejs","nodejs-modules","pretty-print","terminal"],"latest_commit_sha":null,"homepage":"https://spacingbat3.github.io/kolor/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpacingBat3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["SpacingBat3"]}},"created_at":"2022-01-12T20:55:20.000Z","updated_at":"2025-01-28T13:37:40.000Z","dependencies_parsed_at":"2024-06-21T02:11:39.478Z","dependency_job_id":"555fdcc9-9451-4161-879a-9153b8958a73","html_url":"https://github.com/SpacingBat3/kolor","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"a5d9f36d67ef224e3b980b3f683b73003294f99e"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2Fkolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2Fkolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2Fkolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpacingBat3%2Fkolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpacingBat3","download_url":"https://codeload.github.com/SpacingBat3/kolor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250532070,"owners_count":21446109,"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":["chalk","chalkjs","colors","colorsjs","console","library","logging","module","nodejs","nodejs-modules","pretty-print","terminal"],"created_at":"2024-11-10T10:12:43.174Z","updated_at":"2025-04-23T23:31:40.456Z","avatar_url":"https://github.com/SpacingBat3.png","language":"TypeScript","funding_links":["https://github.com/sponsors/SpacingBat3"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=center\u003e\n\n# @spacingbat3/kolor\n\nA simple Node.js/ESM module to add *kolors* to your terminal output!\n\n*Kolor* is a Polish word that means *colour* / *color*.\n\n\u003c/div\u003e\n\n## Usage:\n\n\u003e [!NOTE]\n\u003e Recently, `@spacingbat3/kolor` has dropped CJS syntax in favour of ESM-only\n\u003e support and loading. It also introduced the experimental `__kolorTTY` global\n\u003e you might use for now as a fallback mechanism of determining whenever `kolor`\n\u003e should colorize strings in non-Node.js-compatible runtimes.\n\n### ESM / TypeScript:\n\n1. Importing selected group of functions (`colors` or `modifiers[*]`):\n```ts\nimport {colors, modifiers} from \"@spacingbat3/kolor\"\n\n// Because errors should be red :)\nconsole.error(colors.red(\"ERROR: Something went wrong!\"))\n\n// Modifiers are grouped by `safe` and `other`:\nconsole.log(modifiers.safe.bold(\"Definitely important text.\"))\n```\n\n2. Importing `default` object as `colors` that contains all method packed in one\n   object (except `other` modifiers, they're in `unsafe` object).\n```ts\nimport colors from \"@spacingbat3/kolor\"\n\n// Now, syntax is similar to the one in `colors/safe` module.\nconsole.warn(colors.bold(\"==\u003e \"+colors.brightYellow(\"Warning:\"))+\" Something happened!\")\n```\n\n## FAQ\n\n### Why I started to develop it?\n\nIn general, I made this module as an answer to `colors` library *sabotage*. I\ndecided to neither thrust `colors` not any alternatives to it, when I only need\nsome of its features.\n\nYou can of course use this library as well in your project, if you want to.\nAs of concerns of me not being trustworthy, I don't really care that much.\nEspecially I should point out this software is not \"corporate-grade\", so in case\nof the global failures, the blame lies on the user – as I disclaim any\nresponsibility for what this software might do, whenever intentionally or not,\nas specified in the license that should be distributed with this software. Of\ncourse, my will is to fix bugs and maintain the software, but I'm not offering\nany personal help, fixes, patching nor any service you'd expect from software\nused in commercial software.\n\n### Why not just use `chalk` or fork of `colors`?\n\nThis project has a different philosophy that both of these projects. It doesn't\naim to provide any kind of complex features that are not related to ANSI escape\ncodes nor it aims to be complex in any way – while it aims to be a generic\nsolution strictly based on EcmaScript standard and only using Node's APIs when\nnecessary without strong dependence on them, it's goal is to be a rather simple\nlibrary, with very limited feature set to what I find necessary, hence being\nmore opinionated.\n\nOne of the key differences (at least from `colors`) is that `kolor` separates\nsome ANSI escape codes that are not working on all platforms, which you may find\nuseful if you aim for your code to offer cross-platform experience.\n\nSince `v3.2.0` it also provides the type definitions for transforming the\nliteral types, which makes TypeScript to accurately predict all combinations of\ntypes for the library and overall improves the type accuracy (not just for\nliterals).\n\n## Legal\n\nThis project is licensed under the `ISC` license, which should be\n[distributed with this project][license]. Not distributing it with this library\nmight be against the license – please read the license for further information.\n\n[license]: ./LICENSE \"License of this software\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacingbat3%2Fkolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacingbat3%2Fkolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacingbat3%2Fkolor/lists"}