rakutentech / r10 / R10.Theme

This is how we store information about the primary color used and if the site is in light or dark mode.

Most of the application use only one primary color but some are configurable and can be used with different colors.


type alias Theme =
{ mode : R10.Mode.Mode
, primaryColor : R10.Color.Internal.Primary.Color 
}

fromFlags : { a | mode : R10.Mode.Mode, primaryColor : R10.Color.Internal.Primary.Color } -> Theme

Usually mode and primaryColor are stored in the flags. Use this helper to create a Theme from flags.