Documentation

Android Keyboard Theme

Create a Theme

All the themes for the keyboard can be defined in a single JSON file. Create a file called KBThemes.json in your app/src/main/assets folder with the following structure:

[
  {
    "order": 0,
    "kb1_toolbar_items_color": "#FFFFFF",
    "kb2_toolbar_active_item_color": "#0096FF",
    "kb3_toolbar_bg_color": "#6BBFFA",
    "kb4_main_elements_color": "#65ADE0",
    "kb5_secondary_elements_color": "#333748",
    "kb6_misc_elements_color": "#47ADF4",
    "kb7_keyborders_bg_color": "#FFFFFF",
    "kb8_keyborders_text_color": "#333748",
    "kb9_no_keyborders_text_color": "#333748",
    "kb10_neutral_status_color": "#494369",
    "kb11_good_status_color": "#51BD9F",
    "kb12_warning_status_color": "#FBBC17",
    "kb13_bad_status_color": "#ED4057",
    "kb14_main_color_foreground_color": "#FFFFFF",
    "kb15_keyboard_background_color": "#F6F6F6",
    "kb16_keyboard_cards_color": "#D6D6D6",
    "kb17_abc_items_color": "#333748",
    "kb18_abc_bar_background_color": "#F6F6F6",
    "kb19_keyboard_text_color": "#333748",
    "kb_toolbar_items_logo": "kb_toolbar_items_logo_0.png",
    "kb_theme_preview_large_nokeyborders": "kb_theme_preview_large_nokeyborders_0",
    "kb_theme_preview_large_keyborders": "kb_theme_preview_large_keyborders_0",
    "kb_theme_preview_small": "kb_theme_preview_small_0",
    "kb_wallpaper_portrait": "kb_wallpaper_portrait_0",
    "kb_wallpaper_landscape": "kb_wallpaper_landscape_0"
  },
  {
    "order": 1,
    "kb1_toolbar_items_color": "#F6F6F6",
    "kb2_toolbar_active_item_color": "#FDE700",
    "kb3_toolbar_bg_color": "#292C3A",
    "kb4_main_elements_color": "#3D7CB3",
    "kb5_secondary_elements_color": "#252834",
    "kb6_misc_elements_color": "#3D7CB3",
    "kb7_keyborders_bg_color": "#2D303F",
    "kb8_keyborders_text_color": "#FFFFFF",
    "kb9_no_keyborders_text_color": "#FFFFFF",
    "kb10_neutral_status_color": "#494369",
    "kb11_good_status_color": "#51BD9F",
    "kb12_warning_status_color": "#FBBC17",
    "kb13_bad_status_color": "#ED4057",
    "kb14_main_color_foreground_color": "#FFFFFF",
    "kb15_keyboard_background_color": "#333748",
    "kb16_keyboard_cards_color": "#40455A",
    "kb17_abc_items_color": "#FFFFFF",
    "kb18_abc_bar_background_color": "#333748",
    "kb19_keyboard_text_color": "#FFFFFF",
    "kb_toolbar_items_logo": "kb_toolbar_items_logo_1.png",
    "kb_theme_preview_large_nokeyborders": "kb_theme_preview_large_nokeyborders_1",
    "kb_theme_preview_large_keyborders": "kb_theme_preview_large_keyborders_1",
    "kb_theme_preview_small": "kb_theme_preview_small_1",
    "kb_wallpaper_portrait": "kb_wallpaper_portrait_1",
    "kb_wallpaper_landscape": "kb_wallpaper_landscape_1"
  }
]

Structure

The JSON structure defines numerous themes in a root array object. Each theme is comprised of the following elements:

PropertyData TypeDescription
orderIntegerThe order the theme will appear in the keyboard themes selector
kb1_toolbar_items_colorColorToolbar items color
kb2_toolbar_active_item_colorColorToolbar active item color
kb3_toolbar_bg_colorColorToolbar background color
kb4_main_elements_colorColorBrand main color
kb5_secondary_elements_colorColorBrand secondary color
kb6_misc_elements_colorColorBrand miscellaneous elements color
kb7_keyborders_bg_colorColorKey borders background color
kb8_keyborders_text_colorColorText color for theme with key borders
kb9_no_keyborders_text_colorColorText color for theme with no key borders
kb10_neutral_status_colorColorNeutral status color
kb11_good_status_colorColorGood status color
kb12_warning_status_colorColorWarning status color
kb13_bad_status_colorColorBad status color
kb14_main_color_foreground_colorColorMain color foreground
kb15_keyboard_background_colorColorKeyboard background color
kb16_keyboard_cards_colorColorKeyboard cards color
kb17_abc_items_colorColorABC items color
kb18_abc_bar_background_colorColorABC bar background color
kb19_keyboard_text_colorColorKeyboard text color
kb_toolbar_items_logoDrawableKeyboard toolbar items logo
kb_theme_preview_large_nokeybordersDrawableLarge theme preview for theme with no key borders
kb_theme_preview_large_keybordersDrawableLarge theme preview for theme with key borders
kb_theme_preview_smallDrawableSmall theme preview
kb_wallpaper_portraitDrawablePortrait wallpaper
kb_wallpaper_landscapeDrawableLandscape wallpaper

Key:

  • Color is a RGB hex string in the following format: #RRGGBB
  • Drawable is the name of the drawable defined in the application resources. They SDK will automatically load the resource. If using image formats such as PNG it is recommended to include assets for the following sizes: mdpi, hdpi, xhdpi, xxhdpi & xxxhdpi.