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

Can I create a Custom Color to replace the primary color? #384

Open
naakmsc opened this issue May 17, 2023 · 1 comment
Open

Can I create a Custom Color to replace the primary color? #384

naakmsc opened this issue May 17, 2023 · 1 comment

Comments

@naakmsc
Copy link

naakmsc commented May 17, 2023

I would like to leave a specific color for the primary color in ColorScheme, but I can't find any other way than the default ones.
image

@naakmsc naakmsc changed the title Can you create a Custom Color to replace the primary color? Can I create a Custom Color to replace the primary color? May 17, 2023
@valimaties
Copy link

Press F12 over the ColorScheme, and it will open for you the constructors.
As you will see, there are four constructors for this ColorScheme class:

  • first is the non-parametrized constructor, which will set automatically some colors for you, using the second constructor with some default values
  • second is using Primary enum, which stores some Hex values of the colors (web colors).
  • third uses int values, which will be converted to colors using ToColor() function from the Extensions.cs class
  • fourth uses Color struct.

Try to use the third or the fourth constructor:

public ColorScheme(int primary, int darkPrimary, int lightPrimary, int accent, TextShade textShade) 

or

public ColorScheme(Color primary, Color darkPrimary, Color lightPrimary, Color accent, TextShade textShade)

I probably find more usefull the fourth constructor, using Color struct.

Regards,
Vali

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

No branches or pull requests

2 participants