MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit

PrimaryBody and SecondaryBody colors for theme

Open
#1,757 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
16.3k
Forks
3.5k
Avg merge
1d 22h
Merged PRs (30d)
8

Description

For my project I am currently writing a style for RadioButton that is styled as a ChoiceChip (https://material.io/components/chips#choice-chips)
Currently I have the following result:
![image](https://user-images.githubusercontent.com/7225673/79998566-2142d400-84bb-11ea-847d-dd09c1540fbe.png)

As you can see the light theme is nice, but unfortunately the foreground color of the dark theme does not have enough contrast.
The problem is that for light theme I need the foreground to be PrimaryHueDarkBrush, but for the dark theme it must be PrimaryHueLightBrush. (Same for Secondary)
I currently think the best way to achieve this is by introducing a PrimaryBody and SecondaryBody color to the theme. The naming because it reacts in a similar way as currently the MaterialDesignBody color does.

I am willing to look into creating a PR with the necessary changes if you also see this as a good solution. Otherwise I hope you can come up with a better solution to fix this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing theme color behavior for PrimaryHueDarkBrush, PrimaryHueLightBrush, Secondary colors, and MaterialDesignBody. Trace how a RadioButton styled as a ChoiceChip selects foreground colors in light and dark themes, then verify that the proposed PrimaryBody and SecondaryBody behavior provides sufficient contrast in both themes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.