Background Color#
#
Note
The following classes are intended for in-house use of the library.
API - kivymd.uix.behaviors.backgroundcolor_behavior
#
- class kivymd.uix.behaviors.backgroundcolor_behavior.BackgroundColorBehavior(**kwarg)#
- background#
Background image path.
background
is aStringProperty
and defaults to ‘’.
- radius#
Canvas radius.
# Top left corner slice. MDBoxLayout: md_bg_color: app.theme_cls.primary_color radius: [25, 0, 0, 0]
radius
is anVariableListProperty
and defaults to [0, 0, 0, 0].
- md_bg_color#
The background color of the widget (
Widget
) that will be inherited from theBackgroundColorBehavior
class.For example:
Widget: canvas: Color: rgba: 0, 1, 1, 1 Rectangle: size: self.size pos: self.pos
similar to code:
<MyWidget@BackgroundColorBehavior> md_bg_color: 0, 1, 1, 1
md_bg_color
is anColorProperty
and defaults to [0, 0, 0, 0].
- line_color#
If a custom value is specified for the line_color parameter, the border of the specified color will be used to border the widget:
MDBoxLayout: size_hint: .5, .2 md_bg_color: 0, 1, 1, .5 line_color: 0, 0, 1, 1 radius: [24, ]
Added in version 0.104.2.
line_color
is anColorProperty
and defaults to [0, 0, 0, 0].
- line_width#
Border of the specified width will be used to border the widget.
Added in version 1.0.0.
line_width
is anNumericProperty
and defaults to 1.
- angle#
- background_origin#
- on_md_bg_color(instance, color: list | str)#
Fired when the values of
md_bg_color
change.