Skip to content

Need a helper for getting seed colors for the material3 color system #42

Open
@ber4444

Description

@ber4444

I am happy that this library exposes the Hct class which was used under the hood in Material library's MaterialColors.getColorRoles() like this:

    Hct hctColor = Hct.fromInt(color);
    hctColor.setTone(tone);
    return hctColor.toInt();

Basically, I used it to get color roles for a seed color, which as per material specs are at tonal values of 10, 40, 90 and 100.

All good, but now my designer wants me to use the exact color code for the onAccentContainer role, which would be the seed color at tonal value of 10. How do I generate this seed color, so that after setTone(10) I would get the exact color code he wants, while also supporting all the other material color system tones?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions