feat: add custom color theme support #35
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @fvrests,
I've been using Lavender as my new tab page for a while now. I love the Rosé Pine theme colors and changed my themes, including Google Chrome, to match. However, Lavender still works well for me, but they don't really match. I like the minimalist nature of Lavender, so I thought I should contribute a custom color feature to it. The default colors are pretty cool, by the way!
For custom theme, I have added a utility which does the job of deciding whether the color is darker or lighter.
----- Copilot Generated Description -----
This pull request introduces a new custom color theme feature. The most important changes include the addition of a custom color theme, updates to the options menu to support the new theme, and utility functions to handle color processing.
Screen.Recording.2024-11-22.at.2.51.08.AM.mp4
Custom Color Theme Feature:
src/assets/styles/global.css
: Added custom color variables and updated theme classes to include the custom theme.src/store/options.ts
: AddedcustomColor
to the theme state and a method to set and preview the custom color.Options Menu Updates:
src/components/options.vue
: Integrated the custom color theme into the options menu, including input handling and theme selection.Utility Functions:
src/utils/helpers.ts
: Added utility functionshexToRgb
andisColorDark
to process and determine color brightness.These changes collectively enable users to customize the theme color and ensure the application handles color selection and theme application effectively.