Changing the Theme
Last updated
Last updated
To keep on adjusting the style of the app, we’ll change the styling of some Variables and Variants so that they better match our new logo.
We will change the colors of our Web Page to better match the color of our example logo. These are the Hex codes for the colors we are going to use:
Orange: E36127
Blue: 007A78
Go to Theme Builder.
Under the Variables section, click on Colors
Click on brandPrimary
Change the default HEX color to E36127. You can edit the value for the HEX color code by using the field below the color panel to the right.
Click on textPrimary and change the default HEX color to 007A78.
Additionally, change some of tints and secondary colors so that they all look good in combination:
brandPrimary #E36127 brandPrimaryTint1 #ECA673 brandPrimaryTint2 #F8E0BB brandPrimaryTint3 RGBA (237, 188, 136, 0.1) brandError #E31212 textPrimary #007A78 textSecondary #51B5B3 borderPrimary #676464 borderSecondary RGBA (0, 0, 0, 0.2) backgroundPrimary #FFFFFF backgroundSecondary #F4F4F4
Some Theme colors only support RGBA color codes. You can alternate between the different color codes available for each color Variable by clicking on the up and down arrows next to the color code name.
Alternatively, you can also use the slide bars to select a color. The slide bars allow you to choose the primary color and its transparency, and the color panel allow you to change between different alternatives of that selected color. The circle to the left of the bars is a preview of the current selected color.
When using a Web Control, the Variant used in that control will be a default one. To see what Variant is being used in a selected Control, go to the Inspector to the right, and select the Style tab, under the Variant, you will see what Variant is selected. When a Web Control is created, it will have the default
Variant.
If you make any styling modifications to a Control, the Variant name will have an asterisk symbol (*) to let you know that the selected Variant was modified. This will also happen for the name of the sections you modify in the Style tab.
You can make different changes to a Variant on the Inspector. To do this, go to the Inspector to the right and click on the Style tab. Here, you can modify a selected Variant directly in the Theme Builder using the Edit in Theme Builder option. Alternatively, you can also make styling modifications to a Control and use those changes to create a new variant using the Create Theme Variant option or update an existing one using the Update Theme Variant option. You can also revert all your styling changes using the Reset All Overrides option.
Let's modify the current default Variant:
On Web Flows, go to Terms and conditions accept > Info form page > Section container > Action container > Continue button
On the Inspector, click on the Style tab. On Variant, make sure default is selected.
Click Layout > Spacing and change the bottom and top padding to 15px
for a larger margin.
On Border, change the border Style to double, select the brandPrimaryTint1 and choose 4px
to make it look wider:
We will modify the state of our current Variant for when the button is pressed, by changing the color of the default Variant, when pressed, to a lighter color.
On Variant, select Variant State Pressed
On Background, select the brandPrimaryTint2.
We will save our changes. On Variant, click the three dot option button and select Update Theme Variant. This will overwrite the default settings for that Variant and replace them with the current ones.
We will now create a new Variant, to have two style options for our buttons. We will use the other branding color of our example logo.
Make sure both default for Variant and default for Variant State options are selected, then click on Create Theme Variant
Give a name to this new Variant, for this exercise, we will name it defaultAlternative. Click on Create
On Background, select the textPrimary color and on Border, select textSecondary as color.
Save your changes using the Update Theme Variant option, again.
Save the app and go to App Preview to see the changes reflected: