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

dynamicColorScheme() doesn't specify any value for some of the surface* color attributes #111

Closed
armond-avanes opened this issue Feb 29, 2024 · 2 comments · Fixed by #112

Comments

@armond-avanes
Copy link

The ColorScheme(...) constructor that is used in dynamicColorScheme() leaves the following color attributes unspecified, and their corresponding methods in MaterialDynamicColors class are not utilized there:

        surfaceBright = Color.Unspecified,
        surfaceDim = Color.Unspecified,
        surfaceContainer = Color.Unspecified,
        surfaceContainerHigh = Color.Unspecified,
        surfaceContainerHighest = Color.Unspecified,
        surfaceContainerLow = Color.Unspecified,
        surfaceContainerLowest = Color.Unspecified,
public class MaterialDynamicColors {
    ....
    public fun surfaceBright(): DynamicColor = DynamicColor(...)
    public fun surfaceDim(): DynamicColor = DynamicColor(...)
    public fun surfaceContainer(): DynamicColor = DynamicColor(...)
    public fun surfaceContainerHigh(): DynamicColor = DynamicColor(...)
    public fun surfaceContainerHighest(): DynamicColor = DynamicColor(...)
    public fun surfaceContainerLow(): DynamicColor = DynamicColor(...)
    public fun surfaceContainerLowest(): DynamicColor = DynamicColor(...)
}

By utilizing the main constructor of ColorScheme(...), the above missing attributes can be specified there.

jordond added a commit that referenced this issue Feb 29, 2024
@jordond
Copy link
Owner

jordond commented Feb 29, 2024

Good catch! Thanks for pointing it out 👍

jordond added a commit that referenced this issue Feb 29, 2024
@armond-avanes
Copy link
Author

armond-avanes commented Feb 29, 2024

Thanks for your prompt action and for the new release!

fbarthelery pushed a commit to fbarthelery/MaterialKolor that referenced this issue Mar 1, 2024
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 a pull request may close this issue.

2 participants