Loading...
 
Skip to main content
(Cached)

Organization of button colors in Tiki

Finding a balance between semantic colors and theme palette colors

Tiki uses the Bootstrap CSS framework and one design principle of Bootstrap is to use semantic colors to indicate user interface meanings so, by default, Bootstrap websites use several button colors that have more or less intuitive meanings. However, these meanings aren't necessarily clear and can appear random, and in some cases they don't work well visually with the site's theme. For this reason, the designer or administrator might want to modify the concept of semantic colors for buttons. This is described below.

Starting point: implementing meaningful button colors

The goal here is to make the meaning of button colors in Tiki more intuitive and consistent, in the Bootstrap Default theme, for example, as a baseline. Of course every theme has its own color palette and button colors vary from the default.

In Bootstrap 4, which is integrated into Tiki starting in version19, some button class names and default colors have changed from Bootstrap 3. (See

For this reason, the button classes are being organized in the .tpl files, etc. and will be in the HTML and they will be most apparent in the Default Bootstrap theme. Other themes, of course, can style buttons as they please but the hope is that the organization of button colors makes sense and will benefit themes and users even if the themes' palettes vary from the Bootstrap default.

One suggestion is that sites could assign an admin theme that shows the button colors most clearly, and another site theme with perhaps less obvious colors that are toned down from the default ones.

Button purpose CSS class, and color in Bootstrap default theme Action examples
Make a significant non-destructive change btn-primary (royal blue -#007bff) Save, Apply, Rename, Select, Attach
Confirmation for non-destructive change btn-success (green) Anti-CSRF confirmation
Make a destructive change btn-danger (red) Delete, Remove
Confirmation for destructive change btn-warning (yellow) Are you sure?
Display information
btn-info (turquoise blue - #17a2b8) History, Source, Preview, Find
Make an insignificant change
btn-secondary ("cyber grape") Tabs/No tabs, Sort, Filter, Files, Comments, More

Dev mailing list discussion starts here:

Questions

Giving priority to the theme palette - examples: FiveAlive-lite and FiveAlive

In October 2019 (in Tiki 20svn), the issue came up that, in particular, the "Info" button color (blue by default) looked out of place in some of the FiveAlive-lite child themes that are used for the Tiki project sites (tiki.org, themes.tiki.org, etc.). The color looked "wrong". The reason for the button being blue isn't apparent to site users. The suggestion was made (by luci) to use the theme child colors shown at

Other themes and other websites might also have issues with the default Bootstrap semantic colors on buttons, so clearly it's necessary for designers and admins to make choices to get the best end result, and the colors in the site's theme or themes should be chosen accordingly.

Unique problem of child theme variants

For a standard Tiki theme, the semantic colors (for primary, secondary, success, info, warning, danger meanings) are defined in the theme's variables file and compiled to disseminate into all parts of the theme that need the coloring. It's a little problematic for child themes to diverge from the parent theme in regard to these colors because of the complexity of button variations - normal, hover, disabled, outline, etc. And the child theme stylesheet should be kept small; if it gets too large and comprehensive, it might as well be a standard theme. Some child themes are edited directly in CSS, for simple cases. Others are compiled from SCSS files, to be able to use variables and to avoid duplicated code, etc. This is a good choice when button colors need to be modified.

To vary the button colors in compiled child themes, follow the example of the FiveAlive-lite child themes (solid button background colors) and FiveAlive child themes (gradient button backgrounds).


Page last modified on Friday 29 of August, 2025 06:21:37 UTC
Collapse/expand modules below