Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make primary and error color configurable #204

Closed

Conversation

javaes
Copy link

@javaes javaes commented May 4, 2024

I'm quite new to rust, so posting this as a draft first, please check if I'm on the right track.

Things I still plan to do:

  • fallback to default if color config is unparsable
  • add tests
  • add documentation
  • add changelog entry

Description

Making the primary and the error colors configurable.

Closes #193

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

QA

How did you test this?

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

@javaes javaes marked this pull request as draft May 4, 2024 02:44
@javaes javaes changed the title Draft: feat: make primary and error color configurable feat: make primary and error color configurable May 4, 2024
@LucasPickering
Copy link
Owner

Hey @javaes thanks for this, unfortunately I started working on this last night and also have something almost done :( I just put my up in another PR if you want to reference it; Ours look very nearly identical, the main difference is mine stores the colors as the Color type from Ratatui, which means 1. we never have to copy colors and 2. It does all the deserialization for us. The one thing remaining is I want to replace the contrast_text function with just an additional field in the theme called primary_color_contrast, which will let the user select which color to use for text with the primary color background (generally will be white or black). I'll be doing that tomorrow probably since I won't have time today.

@javaes
Copy link
Author

javaes commented May 4, 2024

No worries, anyways still a learning experience for me! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make theme customizable
2 participants