{"id":26908752,"url":"https://github.com/travisgk/colortones","last_synced_at":"2025-04-01T12:18:14.624Z","repository":{"id":238375388,"uuid":"788228256","full_name":"travisgk/colortones","owner":"travisgk","description":"A Python script to color Chinese syllables by their tones in the form of an HTML table.","archived":false,"fork":false,"pushed_at":"2024-11-04T18:08:47.000Z","size":2508,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-04T18:38:00.053Z","etag":null,"topics":["chinese","css","html-generator","html5","international-phonetic-alphabet","language-learning","language-tones","linguistics","mandarin","phonemes","phonetics","pinyin","tones","zhuyin"],"latest_commit_sha":null,"homepage":"","language":"Python","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/travisgk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-04-18T02:35:58.000Z","updated_at":"2024-11-04T18:08:50.000Z","dependencies_parsed_at":"2024-05-05T23:22:51.630Z","dependency_job_id":"8c3ce589-43e7-4916-9abd-566d108c4a4e","html_url":"https://github.com/travisgk/colortones","commit_stats":null,"previous_names":["travisgk/chromapinyin","travisgk/colortones"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisgk%2Fcolortones","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisgk%2Fcolortones/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisgk%2Fcolortones/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisgk%2Fcolortones/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travisgk","download_url":"https://codeload.github.com/travisgk/colortones/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635943,"owners_count":20809333,"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":["chinese","css","html-generator","html5","international-phonetic-alphabet","language-learning","language-tones","linguistics","mandarin","phonemes","phonetics","pinyin","tones","zhuyin"],"created_at":"2025-04-01T12:18:14.142Z","updated_at":"2025-04-01T12:18:14.606Z","avatar_url":"https://github.com/travisgk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# colortones\nA Python script that colors Chinese characters to match their spoken tone.\nThis tool provides other transcriptions into zhuyin, pinyin, and the IPA as well.\n\n\u003cbr\u003e\n\n# Setup\n```\npip install pypinyin jieba\n```\n\n\u003cbr\u003e\n\n# Example\n\u003cimg src=\"https://github.com/travisgk/colortones/blob/main/_demo_output/_sample.png?raw=true\"\u003e\n\n```\nimport colortones\n\n# processes the text.\nchinese = \"老板想买哪种水果？我听不懂。不要打扰我。\"\nparagraph = colortones.process_text(chinese)\n\n# loads a color scheme.\nscheme = colortones.load_color_scheme(\"default\")\n\n# prints colored text to the console.\nprint(paragraph.to_color_str(\"hanzi\", color_scheme=scheme))\nprint(paragraph.to_color_str(\"pinyin\", color_scheme=scheme))\nprint(paragraph.to_color_str(\"ipa-root\", color_scheme=scheme))\nprint(paragraph.to_color_str(\"zhuyin-root\", color_scheme=scheme))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisgk%2Fcolortones","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravisgk%2Fcolortones","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisgk%2Fcolortones/lists"}