{"id":16454002,"url":"https://github.com/auser/colors","last_synced_at":"2025-02-26T20:44:16.846Z","repository":{"id":593460,"uuid":"228221","full_name":"auser/colors","owner":"auser","description":"Add colors to your terminal output","archived":false,"fork":false,"pushed_at":"2009-07-23T21:14:27.000Z","size":80,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-09T14:06:37.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://poolpartyrb.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"pteichman/go.cobe","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/auser.png","metadata":{"files":{"readme":"README.rdoc","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}},"created_at":"2009-06-16T01:54:39.000Z","updated_at":"2019-08-13T14:26:29.000Z","dependencies_parsed_at":"2022-07-05T02:30:28.631Z","dependency_job_id":null,"html_url":"https://github.com/auser/colors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auser%2Fcolors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auser%2Fcolors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auser%2Fcolors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/auser%2Fcolors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/auser","download_url":"https://codeload.github.com/auser/colors/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240934412,"owners_count":19880991,"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-10-11T10:17:41.327Z","updated_at":"2025-02-26T20:44:16.826Z","avatar_url":"https://github.com/auser.png","language":"Ruby","readme":"= colors\n\nEver wondered how to get colors on your terminal? Now you can and ever so easily. \n\nFirst, gotta thank the Passenger folks for the initial implementation of the brilliant idea.\n\n== Usage\n  require \"colors\"\n  \n  Colors.process(\"\u003cred\u003eText\u003c/red\u003e\")\n  \nAny of these colors red, green, yellow, blue, purple, sea, white are available.\n\nYou can add backgrounds to your color by passing bg= in a tag, for instance:\n  \n  Colors.process(\"\u003cblue bg=yellow\u003eBlue text on yellow bg\u003c/blue\u003e\")\n  \nFinally, you can bold your text with \u003cb\u003e, for instance:\n  \n  Colors.process(\"\u003cb\u003eBOLD\u003c/b\u003e\")\n\n== Terminal color explanation\n\nNon-printing escape sequences have to be enclosed in \\[\\033[ and \\]. For colour escape sequences, they should also be followed by a lowercase m.\n\nSo for instance, if you wanted red text, for example, you would surround your text with:\n\n  \\e[1m\\e[31mRed text\\e[0m\\e[37m\\e[40m\n\nTo see all the colors available on your terminal and as a quick and easy guide, run this in your shell:\n  #!/bin/bash\n\n  T='text'   # The test text\n\n  echo -e \"\\n                 40m     41m     42m     43m\\\n       44m     45m     46m     47m\";\n\n  for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \\\n             '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \\\n             '  36m' '1;36m' '  37m' '1;37m';\n    do FG=${FGs// /}\n    echo -en \" $FGs \\033[$FG  $T  \"\n    for BG in 40m 41m 42m 43m 44m 45m 46m 47m;\n      do echo -en \"$EINS \\033[$FG\\033[$BG  $T  \\033[0m\";\n    done\n    echo;\n  done\n  echo\n\n== Copyright\n\nCopyright (c) 2009 Ari Lerner. See LICENSE for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauser%2Fcolors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauser%2Fcolors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauser%2Fcolors/lists"}