Thread
#compose
    Timo Drick

    Timo Drick

    2 years ago
    Most of the "controls" e.g.: FloatingActionButton, Slider, Circular/LinearProgressIndicator, Button using MaterialTheme.colors.primary as default color. But regarding to the documentation: https://material.io/design/color/the-color-system.html#color-theme-creation and also to the documentation of ColorPalette this kind of elements should use secondary color. Is it planned to change this in the future? Or how should we apply the color themes inside of an app? Currently i have to use custom buttons/controls which override the default color every where. Just because i want to stick to the material theme coloring recommendation.
    v

    Vinay Gaba

    2 years ago
    I apologize if I understood your question incorrectly, but here is an example if you wanted to see how to use a custom theme - https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example/blob/master/app/src/main/java/com/example/jetpackcompose/theme/DarkModeActivity.kt
    manueldidonna

    manueldidonna

    2 years ago
    It's the same using material components for Android. From button doc that kind of component use the primary color https://material.io/components/buttons
    Timo Drick

    Timo Drick

    2 years ago
    Yes you are right. Just wondering why the documentation says:
    interface ColorPalette {
        /**
         * The primary color is the color displayed most frequently across your app's screens and
         * components.
         */
        val primary: Color
        /**
         * The secondary color provides more ways to accent and distinguish your product.
         * Secondary colors are best for:
         * - Floating action buttons
         * - Selection controls, like sliders and switches
         * - Highlighting selected text
         * - Progress bars
         * - Links and headlines
         */
        val secondary: Color
    So maybe for FABs and Sliders secondary color would be better default value
    Andrey Kulikov

    Andrey Kulikov

    2 years ago
    Thanks for noticing! we will update the default colors