{"id":26709396,"url":"https://github.com/js-bits/log-in-color","last_synced_at":"2025-03-27T08:16:46.048Z","repository":{"id":57122338,"uuid":"359963257","full_name":"js-bits/log-in-color","owner":"js-bits","description":"Colorize log messages","archived":false,"fork":false,"pushed_at":"2023-07-19T02:13:30.000Z","size":712,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T20:51:36.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/js-bits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-20T22:09:27.000Z","updated_at":"2023-07-03T20:52:48.000Z","dependencies_parsed_at":"2022-08-24T14:59:27.064Z","dependency_job_id":null,"html_url":"https://github.com/js-bits/log-in-color","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bits%2Flog-in-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bits%2Flog-in-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bits%2Flog-in-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bits%2Flog-in-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/js-bits","download_url":"https://codeload.github.com/js-bits/log-in-color/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806447,"owners_count":20675298,"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":[],"created_at":"2025-03-27T08:16:45.608Z","updated_at":"2025-03-27T08:16:46.039Z","avatar_url":"https://github.com/js-bits.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Colorful console logging\n\nAdd colors to your console output\n\n## Installation\n\nInstall with npm:\n\n```\nnpm install @js-bits/log-in-color\n```\n\nInstall with yarn:\n\n```\nyarn add @js-bits/log-in-color\n```\n\nImport where you need it:\n\n```javascript\nimport { green /* black, red, yellow, blue, magenta, cyan, white */, css } from '@js-bits/log-in-color';\n```\n\nor require for CommonJS:\n\n```javascript\nconst { green /* black, red, yellow, blue, magenta, cyan, white */, css } = require('@js-bits/log-in-color');\n```\n\n## How to use\n\n```javascript\nconsole.log(green('this message is green')); // this message is green\n```\n\nor\n\n```javascript\nconsole.log(green`Now: ${new Date()}`); // Now: Sun Jun 27 2021 11:38:15 GMT-0400 (Eastern Daylight Time)\n```\n\nor\n\n```javascript\nconsole.log(`RGB: ${red`red`}; ${green`green`}; ${blue`blue`}.`); // RGB: red; green; blue.\n```\n\nThe approach above works in Chrome, Edge and Node.js.\nAll browsers should support a little different format:\n\n```javascript\nconsole.log(...css(`RGB: ${red`red`}; ${green`green`}; ${blue`blue`}.`)); // RGB: red; green; blue.\n```\n\nUse provided `css()` function with a spread operator to convert colored string into a list of CSS styles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-bits%2Flog-in-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-bits%2Flog-in-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-bits%2Flog-in-color/lists"}