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

Color Profiles #1058

Merged
merged 21 commits into from
May 11, 2024
Merged

Color Profiles #1058

merged 21 commits into from
May 11, 2024

Conversation

EricBAndrews
Copy link
Member

@EricBAndrews EricBAndrews commented May 10, 2024

Checklist

  • I have read CONTRIBUTING.md
  • I have described what this PR contains
  • If this PR alters the UI, I have attached pictures/videos
  • This PR addresses one or more open issues that were assigned to me:
    - groundwork for Comment bar color themes #803, Themes #252

Pull Request Information

This PR adds support for app-wide color profiles. A new protocol, PaletteProviding, defines the set of color definitions that constitute a color profile. In this PR, two profiles are implemented: StandardPalette and MonochromePalette. Propagating palette information to the app is handled by the global Palette object, which is itself PaletteProviding and operates according to the standard pattern for making any Protocol concrete.

I've only defined colors that we're currently using, on the theory that it will be pretty easy to add colors as we need them. I've opted for semantic rather than literal colors, which will make the protocol a little larger but should give us better flexibility for themes. At some point we're presumably going to need literal colors for things like settings squircles.

This PR also updates CONTRIBUTING.md per Slack

@EricBAndrews EricBAndrews requested a review from a team as a code owner May 10, 2024 23:33
@EricBAndrews EricBAndrews requested review from mormaer and ShadowJonathan and removed request for a team May 10, 2024 23:33
@EricBAndrews EricBAndrews requested a review from Sjmarf May 11, 2024 00:12
CONTRIBUTING.md Outdated Show resolved Hide resolved
Mlem/App/Globals/Definitions/Palette.swift Outdated Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Mlem/App/Constants/Colors/MonochromePalette.swift Outdated Show resolved Hide resolved
Mlem/App/Globals/Definitions/Palette.swift Outdated Show resolved Hide resolved
@EricBAndrews EricBAndrews requested a review from Sjmarf May 11, 2024 15:04
Copy link
Contributor

@Sjmarf Sjmarf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚀

@EricBAndrews EricBAndrews merged commit 050053a into dev2 May 11, 2024
1 check passed
@EricBAndrews EricBAndrews deleted the eric/color-profiles branch May 11, 2024 15:18
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.

None yet

2 participants