【问题标题】:Change the background color of my Watson Virtual Agent更改我的 Watson 虚拟代理的背景颜色
【发布时间】:2016-09-20 21:45:13
【问题描述】:

我使用 Watson Virtual Agent 创建了一个机器人,并将其嵌入到我的网站中。我可以更改聊天窗口的背景颜色,使其与我网站上的其他颜色相匹配吗?

【问题讨论】:

    标签: ibm-watson watson-virtual-agent


    【解决方案1】:

    您当然可以更改聊天小部件的颜色以匹配您的品牌。

    事实上,聊天小部件中使用的每种颜色都是可配置的。

    要选择您自己的颜色,您可以提供您自己的颜色作为您传递给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);
    

    【讨论】:

      猜你喜欢
      • 2014-05-04
      • 1970-01-01
      • 2013-08-08
      • 1970-01-01
      • 2021-05-05
      • 2010-10-27
      相关资源
      最近更新 更多