Join Slack
Communities
Powered by
Hello my people! I have a question: I wish to gene...
# compose-web
j
Joost Klitsie
04/26/2022, 11:52 AM
Hello my people! I have a question: I wish to generate material 3 colors schemes on the fly in my compose-web project 🙂 A bit like:
https://material-foundation.github.io/material-theme-builder/#/custom
where you would select 3 colors and then a palette can be created. Do you know of any ways how to achieve this? I am getting a bit lost here sadly. My current plan would be to somehow create the palettes and then assign them to a scheme like the way in jetpack compose:
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]otlin/androidx/compose/material3/DynamicTonalPalette.kt;l=116
But I don't know how to generate the schemes, does somebody have an idea? 🙂
k
Kirill Grouchnikov
04/26/2022, 1:24 PM
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/packages/SystemUI/monet/src/com/android/systemui/monet/ColorScheme.kt
https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/graphics/cam/Cam.java
👍 1
j
Joost Klitsie
04/26/2022, 3:06 PM
thanks I will have a look 🙂
Joost Klitsie
04/26/2022, 8:06 PM
https://github.com/material-foundation/material-color-utilities
Joost Klitsie
04/26/2022, 8:06 PM
This looks more like it :)
Joost Klitsie
04/27/2022, 9:43 AM
Okay I could convert the parts of that project which I need to kotlin and put it into my web app 😄 so now I can magically generate the themes I need based on a primary and secondary color
5
Views
Open in Slack
Previous
Next