2016-09-20 57 views

回答

2

您當然可以更改聊天窗口小部件的顏色以匹配您的品牌。

實際上,聊天窗口小部件中使用的每種顏色都是可配置的。

要選擇您自己的顏色,您可以提供自己的顏色作爲您傳遞給IBMChat.init函數的config對象的一部分。

下面的例子包含了默認的顏色,但是如果您認爲合適的話,請替換十六進制代碼。

var config = {}; 
//set your other config params 

config.styles = { 
    background: '#3d3d3d', 
    //the main background color 
    accentBackground: '#AF6EE8', 
    /*the background for "accent" elements. 
    These are the attention grabbing elements like a selected button, 
    or a loading spinner*/ 
    accentText: '#ffffff', 
    //the text color for the accentBackground 
    text: '#ffffff', 
    //default text color 
    link: '#ffffff', 
    /*default link color... this should be a color that works both 
    with the "background" color and the "secondaryBackground" color.*/ 
    secondaryBackground: '#464646', 
    /*this is the background for elements that get some emphasis, 
    but not as much as "accent" elements. e.g. An unselected button 
    or a container box for a widget.*/ 
    secondaryText: '#f7f7f7', 
    inputBackground: '#464646', 
    //background color for your form elements, including the main chat input 
    inputText: '#f7f7f7' 
} 

IBMChat.init(config);