{"id":21832675,"url":"https://github.com/tool3/styl3","last_synced_at":"2025-03-21T13:43:38.630Z","repository":{"id":102712855,"uuid":"400166140","full_name":"tool3/styl3","owner":"tool3","description":"💅🏼 themeable cli coloring","archived":false,"fork":false,"pushed_at":"2024-05-23T06:03:47.000Z","size":964,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-23T06:44:20.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/tool3.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-26T12:46:49.000Z","updated_at":"2024-05-27T12:07:05.451Z","dependencies_parsed_at":null,"dependency_job_id":"695ce477-5c5b-42ec-bc84-cb7877fcc93f","html_url":"https://github.com/tool3/styl3","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tool3%2Fstyl3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tool3%2Fstyl3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tool3%2Fstyl3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tool3%2Fstyl3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tool3","download_url":"https://codeload.github.com/tool3/styl3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244807278,"owners_count":20513607,"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":"2024-11-27T19:24:50.364Z","updated_at":"2025-03-21T13:43:38.597Z","avatar_url":"https://github.com/tool3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# styl3 3.0\n\nthemeable cli coloring\n\n# What's New\n\n✅ 20 built-in [themes](#themes)!  \n✅ Formatting [decorators](#decorators)!  \n✅ Supports custom colors and custom themes!  \n✅ Supports hex, rgb, or ansi color codes  \n✅ Color conversion utils such as rgb/hex/ansi  \n✅ Easy and flexible api\n\n## usage\n\n`styl3` can provide color names as functions for coloring output and decorators for adding specific formatting for a given string.  \nfor example:\n\n```typescript\nimport style from \"styl3\";\n\nconst styled = style();\n\nconst output = [\n  \"@*Never* gonna give you !up!@\",\n  \"@Never gonna %let you down%@\",\n  \"@$Never$ gonna run around and *desert* you@\"\n];\n```\n\n![](./shellfies/rick.png)\n\n```javascript\nconst style = require(\"styl3\");\nconst s = style();\n\nconsole.log(s.red`this will be a default red`);\n// access a theme specifically\nconsole.log(s.pastel.green`this will be a pastel green`);\n\nconst ss = style({ theme: \"pastel\" });\n// now `ss.green` points to the pastel green\n\nconsole.log(ss.green`also a pastel green`);\n\n// supports custom hex\nconsole.log(ss.hex(\"#de5285\")`this will be a slick pink`);\n// and rgb\nconsole.log(ss.rgb(15, 106, 251)`this will be a rich blue`);\n```\n\n![](./shellfies/themes.png)\n\n# decorators\n\ndecorators are characters used to wrap a word and give it decorating features,\nsuch as bold, italic, underline, strikeout, inverted and italic.\n\nmore than one decorator can be applied to a word\n\n## map\n\n```javascript\n{\n  bold: '*',\n  underline: '!',\n  dim: '~',\n  hidden: '#',\n  invert: '@',\n  blink: '^',\n  italic: '%',\n  strikeout: '$'\n}\n```\n\n## usage\n\n```javascript\nconst style = require(\"styl3\");\nconst s = style({ theme: \"pastel\" });\n\n// use decorators for bold, underline etc...\nconsole.log(s.red`lush red *BOLD* @INVERTED@`);\n// double decoratros\nconsole.log(s.cyan`this is !*bolderlined!*! get it? bold and underlined...😏`);\nconsole.log(s.green`viva la %italic%`);\nconsole.log(s.pink`address: ~you@somewhere.earth~`);\n```\n\n![](./shellfies/decorators.png)\n\nyou can also provide your own custom decorators map:\n\n```javascript\nconst style = require(\"styl3\");\nconst s = style({ theme: \"pastel\", decorators: { bold: \"_\" } });\n\n// use custom decorators\nconsole.log(s.red`this will now be _BOLD_`);\n```\n\nyou can also provide your own color theme:\n\n```javascript\nconst style = require(\"styl3\");\nconst custom = style({\n  theme: \"custom\",\n  colors: {\n    custom: {\n      red: \"#750404\",\n      green: \"#1b7504\",\n      yellow: \"#929605\",\n      blue: \"#041382\",\n      purple: \"#620182\",\n      cyan: \"#027678\",\n      pink: \"#a3039b\",\n      orange: \"#b37202\"\n    }\n  }\n});\n\n// use custom colors\nconsole.log(s.green`this will be with #1b7504 color`);\n```\n\n# themes\n\n15 unique built-in themes to get you started on easy cli styling  \n[![](https://img.shields.io/static/v1?label=created%20with%20shellfie\u0026message=📸\u0026color=pink)](https://github.com/tool3/shellfie)\n\n| Theme     | Screenshot                            |\n| --------- | ------------------------------------- |\n| autumn    | ![](./shellfies/themes/autumn.png)    |\n| beach     | ![](./shellfies/themes/beach.png)     |\n| champagne | ![](./shellfies/themes/champagne.png) |\n| crayons   | ![](./shellfies/themes/crayons.png)   |\n| lush      | ![](./shellfies/themes/lush.png)      |\n| mint      | ![](./shellfies/themes/mint.png)      |\n| nature    | ![](./shellfies/themes/nature.png)    |\n| neon      | ![](./shellfies/themes/neon.png)      |\n| pastel    | ![](./shellfies/themes/pastel.png)    |\n| pinkish   | ![](./shellfies/themes/pinkish.png)   |\n| pool      | ![](./shellfies/themes/pool.png)      |\n| rainbow   | ![](./shellfies/themes/rainbow.png)   |\n| rufus     | ![](./shellfies/themes/rufus.png)     |\n| sport     | ![](./shellfies/themes/sport.png)     |\n| spring    | ![](./shellfies/themes/spring.png)    |\n| summer    | ![](./shellfies/themes/summer.png)    |\n| sunset    | ![](./shellfies/themes/sunset.png)    |\n| vintage   | ![](./shellfies/themes/vintage.png)   |\n| standard  | ![](./shellfies/themes/standard.png)  |\n| default   | ![](./shellfies/themes/default.png)   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftool3%2Fstyl3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftool3%2Fstyl3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftool3%2Fstyl3/lists"}