{"id":16969075,"url":"https://github.com/webmasterdevlin/themeconverter","last_synced_at":"2025-03-21T18:43:12.935Z","repository":{"id":102789289,"uuid":"426686155","full_name":"webmasterdevlin/ThemeConverter","owner":"webmasterdevlin","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-11T09:17:32.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T13:30:16.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/webmasterdevlin.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-11-10T16:00:07.000Z","updated_at":"2021-11-11T09:17:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"f905336a-483a-4c10-a81b-ef18536b4b32","html_url":"https://github.com/webmasterdevlin/ThemeConverter","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/webmasterdevlin%2FThemeConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2FThemeConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2FThemeConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmasterdevlin%2FThemeConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webmasterdevlin","download_url":"https://codeload.github.com/webmasterdevlin/ThemeConverter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244852129,"owners_count":20521151,"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-14T00:23:56.265Z","updated_at":"2025-03-21T18:43:12.914Z","avatar_url":"https://github.com/webmasterdevlin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Theme Converter for Visual Studio\nTheme Converter is a CLI tool which allows you to convert your VS Code theme to work in Visual Studio. It's a simple tool that maps the colors of a theme to Visual Studio. Themes can be packaged into VSIXs and uploaded to the Marketplace so that more people can use your theme! This allows developers who use Visual Studio, or use both VS Code and Visual Studio, to quickly get access to a wide range of fun and interesting themes! \n\nHere's a quick overview on how the Theme Converter works:\n[\u003cimg width=\"700\" alt=\"Tutorial on converting a theme\" src=\"https://user-images.githubusercontent.com/12738587/134434509-c948f72d-82db-404a-95f2-ccdd1ffe353a.png\"\u003e](https://www.youtube.com/watch?v=2Gwqr5uuBt4)\n\nOur community of authors have already converted a handful of VS Code themes to work in Visual Studio. [Feel free to take a look here](https://aka.ms/vsthemes).\n \n ## Prerequisites\n 1. VS Code\n 2. [VS 2022 Preview 3 or later](https://visualstudio.microsoft.com/vs/preview/) for best results\n 3. The following individual components can be installed via the Visual Studio installer: .NET 5.0 Runtime, .NET Desktop development workload, and Visual Studio extension development workload.\n\n![image](https://user-images.githubusercontent.com/12738587/130517823-6703dcd0-2c53-49c4-a9e0-a79c9b539468.png)\n\n ## Instructions\n ### Using the tool\n1. Open command line in **Admin** mode. \n2. Clone the repo\n3. Go to `\u003cyour_clone_path\u003e\\ThemeConverter\\ThemeConverter` and build the converter project with `dotnet build ThemeConverter.csproj`. \n4. Go to `\u003cyour_clone_path\u003e\\ThemeConverter\\ThemeConverter\\bin\\Debug\\net5.0`. \n5. Get the theme file with steps described in section [Getting a theme's json file](https://github.com/microsoft/theme-converter#getting-a-themes-json-file)\n7. Run `ThemeConverter.exe -h` to see the usage of the tool and use the tool according to your needs.\n    - If you want to convert a theme and patch it to a target VS:\n      - Run `ThemeConverter.exe -i \u003cpath_to_theme_json\u003e -t \u003ctarget_vs_installation_path\u003e`\n      - Example: `ThemeConverter.exe -i \"C:\\myTheme\\TestTheme.json\" -t \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\"`. This command will convert the TestTheme, patch the generated json to the target VS and launch the VS with the converted theme.\n      - Note: the VS installation path can be found in your VS installer (the location field on the modify page).\n      - Now you can see the your converted theme under `Tools -\u003e Themes`! Enjoy!\n\n    - If you just want to convert a theme and get the generated pkgdef:\n      - Run `ThemeConverter.exe -i \u003cpath_to_theme_json\u003e -o \u003coutput_path\u003e`\n      - Example: `ThemeConverter.exe -i \"C:\\myTheme\\TestTheme.json\" -o \"C:\\myTheme\\results\"`. This command will convert the theme and the generated pkgdef will be  `C:\\myTheme\\results\\TestTheme.pkgdef`.\n\n### Getting a theme's json file\n1. Open VS Code. \n2. Install the desired color theme and switch to this theme in VS Code. Please note that this tool will not convert icon themes. \n3. “Ctrl + Shift + P” and run “Developer: Generate Color Theme from current settings.” \n4. In the generated JSON, uncomment all code. When you uncomment, please be careful about missing commas! Make sure the JSON is valid. \n5. Save this as a “JSON” file for the conversion, using the theme's name as the file name. Please ensure that the file’s extension is .json. (The file shouldn’t be saved as a JSONC file.) \n6. **Note**: Because some part of VS UI does not support customized alpha channel, we recommend reducing the usage of not fully opaque colors for better conversion result.\n\n### Creating a VSIX for the new theme\nThis section describes how you can create a VSIX with the converted theme for publishing and sharing.\n1. In VS 2022, create a new \"Empty VSIX Project.\"\n2. Select the project node and open the \"Add existing Item\" window: Use \"Shift + Alt + A\" or right-click on the project node, select Add \u003e Existing Item.\n3. Set filter to All Files (*.*) and select the converted .pkgdef file(s) that you want to include in this VSIX.\n5. Select the newly added pkgdef file in the Solution Explorer and open the Properties window. If the Properties window is not already open, navigate to the View menu at the top \u003e Properties Window.\n\u003cimg width=\"220\" alt=\"blueReadme_propertieswindow\" src=\"https://user-images.githubusercontent.com/12738587/133951341-d8ae0748-14f4-4e31-9e83-2d646b0caab1.png\"\u003e\n\n6. Set `Copy to Output Directory` to `Copy always`.\n7. Set `Include in VSIX` to `true`.\n8. Open the `source.extension.vsixmanifest` file, then select Assets, select New.\n9. Set `Type` to `Microsoft.VisualStudio.VsPackage`, and `Source` to `File on filesystem`.\n10. Select Browse and select the .pkgdef you added. Select OK.\n11. Edit other fields in the vsixmanifest as desired (author, version, company, etc).\n12. Build solution and you now have a vsix in the output folder! Your new theme is most compatible with Visual Studio 2022 Preview 3 and up.\n\n### Removing a converted theme from VS\n1. Open target VS and switch to some theme that will not be deleted (like Blue theme).\n2. Go to `\u003cvs_install_dir\u003e\\Common7\\IDE\\CommonExtensions\\Platform`. e.g: `C:\\Program Files\\Microsoft Visual Studio\\2022\\Preview\\Common7\\IDE\\CommonExtensions\\Platform`\nand delete the pkgdef of the theme that the you want to remove (The name of the pkgdef will match the name of the theme).\n3. Open Developer Command Prompt of the target VS and run `devenv /updateConfiguration`.\n4. Launch VS again, and the themes should now be removed.\n\n# Support\n\n## How to file issues and get help  \nThis project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue.\n\n## Microsoft Support Policy  \nSupport for this project is limited to the resources listed above.\n\n\n# Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n# Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmasterdevlin%2Fthemeconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmasterdevlin%2Fthemeconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmasterdevlin%2Fthemeconverter/lists"}