kiwicom / orbit-swiftui

Kiwi.com Orbit design system library
MIT License
133 stars 23 forks source link

Customizing Colors for system #268

Open matthewnaples opened 2 years ago

matthewnaples commented 2 years ago

Hello, I'm just wondering if there are any plans to add custom color themes. I'd like to use my "product" color that's different than the one baked in. I'm working with a local copy of the repo and changing a couple of the hues, but I'm wondering if there's a better way to go about this? Maybe I could contribute to this if it's not on the docket. I did see a "Prepare design tokens for native platforms" item on the roadmap on your website.

PavelHolec commented 2 years ago

Hello, in future, a "product" design tokens would be a way to go. Currently, the Orbit palette itself is not configurable.

A workaround for now would be to use the .custom() case for color-related variants on components instead of predefined colors. These custom enum cases are meant for such cases where a native Orbit style needs to be overridden.

hrach commented 2 years ago

FYI: both web and android support custom theming: https://github.com/kiwicom/orbit/blob/master/.github/theming.md

matthewnaples commented 2 years ago

I'll try this workaround for now. Thank you for getting back to me!

ysfsl commented 2 years ago

I can't wait for it to be supported like android and web style color customization for iOS. @matthewnaples

PavelHolec commented 2 years ago

Should be now supported by #287. The Storybook contains example of color palette override

cameroncooke commented 9 months ago

Just wanted to follow this up as this change seems to have been reversed in https://github.com/kiwicom/orbit-swiftui/pull/715 - I feel this issue should be re-opened as I also need to overridden the default theme colors.

cameroncooke commented 9 months ago

One option I can think of would be to allow a custom bundle to be used so that we could then just use our own Color.xcassets

PavelHolec commented 8 months ago

One option I can think of would be to allow a custom bundle to be used so that we could then just use our own Color.xcassets

Good idea. That would match the proposed localization bundle environment injection in #764 (either via parameter and/or via environment).