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)¶
Common base class for rectangular and circular elevation behavior.
- background¶
Background image path.
backgroundis aStringPropertyand defaults to None.
- r¶
The value of
redin thergbapalette.ris anBoundedNumericPropertyand defaults to 1.0.
- g¶
The value of
greenin thergbapalette.gis anBoundedNumericPropertyand defaults to 1.0.
- b¶
The value of
bluein thergbapalette.bis anBoundedNumericPropertyand defaults to 1.0.
- a¶
The value of
alpha channelin thergbapalette.ais anBoundedNumericPropertyand defaults to 0.0.
- radius¶
Canvas radius.
# Top left corner slice. MDBoxLayout: md_bg_color: app.theme_cls.primary_color radius: [25, 0, 0, 0]
radiusis anVariableListPropertyand defaults to [0, 0, 0, 0].
- md_bg_color¶
The background color of the widget (
Widget) that will be inherited from theBackgroundColorBehaviorclass.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_coloris anReferenceListPropertyand defaults tor,g,b,a.
- 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, ]
New in version 0.104.2.
line_coloris anColorPropertyand defaults to [0, 0, 0, 0].
- angle¶
- background_origin¶
- update_background_origin(self, *args)¶
- class kivymd.uix.behaviors.backgroundcolor_behavior.SpecificBackgroundColorBehavior(**kwargs)¶
Common base class for rectangular and circular elevation behavior.
- background_palette¶
See
kivymd.color_definitions.palette.background_paletteis anOptionPropertyand defaults to ‘Primary’.
- background_hue¶
See
kivymd.color_definitions.hue.background_hueis anOptionPropertyand defaults to ‘500’.
- specific_text_color¶
specific_text_coloris anColorPropertyand defaults to [0, 0, 0, 0.87].
- specific_secondary_text_color¶
specific_secondary_text_color`is an :class:`~kivy.properties.ColorPropertyand defaults to [0, 0, 0, 0.87].