Skip to content

覆盖颜色 ​

此配置参数允许您覆盖当前选择的 color_scheme 的默认颜色。这使您能够根据仪表板主题和个人喜好完全自定义地图的视觉美感。首选颜色可以在 YAML 配置的 override_colors 设置下定义,支持标准颜色代码,如十六进制、RGB 和 RGBA 值。

暗模式颜色

可以专门为暗模式定义单独的颜色,将它们归类在 override_colors 内的 dark 部分。当 Home Assistant 仪表板使用暗色主题时,这些颜色会自动优先显示。

可覆盖的颜色:

  • floor, wall, passive_segment, new_segment, hidden_segment
  • no_go, no_go_outline, no_mop, no_mop_outline
  • virtual_wall, virtual_threshold, passable_threshold, impassable_threshold
  • ramp, ramp_outline, low_lying_area, auto_low_lying_area, manual_low_lying_area
  • curtain, split_line
  • active_area, active_area_outline, active_point, active_point_outline
  • carpet, carpet_outline, deleted_carpet, deleted_carpet_outline, detected_carpet, detected_carpet_outline
  • path, mop_path
  • icon_background, settings_background, settings_icon_background
  • text, order, text_stroke
  • obstacle_background, floor_material
  • carpet_color_selected, detected_carpet_color, carpet_color, carpet_color_deleted
  • wifi_wall, wifi_excellent, wifi_high, wifi_low, wifi_poor, wifi_unreached
  • dirty_area, clean_area, second_clean_area
  • blocked_segment, blocked_segment_overlay, blocked_segment_floor

区域颜色

当覆盖 segment 颜色时,每个房间必须定义为两种颜色的一对。在每对颜色中,第一种颜色是房间的正常颜色,第二种颜色是在房间被选中时使用的颜色。

卡片样式

此配置仅覆盖地图内部绘制的颜色。如果需要覆盖与整体卡片界面相关的颜色,请参阅 卡片样式 部分。

YAML 示例 ​

yaml
type: custom:dreame-vacuum-card
entity: vacuum.l10s_gen2
override_colors:
  floor: 'rgba(110,110,110,1)'
  wall: 'rgba(64,64,64,1)'
  path: 'rgba(200,200,200,1)'
  active_area: 'rgba(113,189,237,0.4)'
  no_go: 'rgba(133,0,0,0.5)'
  no_mop: 'rgba(134,0,226,0.5)'
  virtual_wall: 'rgba(133,0,0,0.78)'
  carpet: 'rgba(36,163,55,1)'
  icon_background: 'rgba(50,50,50,1)'
  text: 'rgba(220,220,220,1)'
  segment:
    - - 'rgba(46,81,142,1)'
      - 'rgba(12,92,232,1)'
    - - 'rgba(130,111,38,1)'
      - 'rgba(180,146,9,1)'
    - - 'rgba(39,111,158,1)'
      - 'rgba(15,152,242,1)'
    - - 'rgba(83,104,56,1)'
      - 'rgba(76,168,63,1)'
  dark:
    floor: 'rgba(20,20,20,1)'
    wall: 'rgba(40,40,40,1)'
    path: 'rgba(255,255,255,0.8)'
    active_area: 'rgba(50,100,200,0.4)'
    no_go: 'rgba(200,0,0,0.5)'
    no_mop: 'rgba(100,0,100,0.5)'
    icon_background: 'rgba(50,50,50,1)'
    text: 'rgba(255,255,255,1)'