In this example, a code changing background color of application according to slider position is written. In Kivy, color values are changing from 0 to 1 and as a result floating point numbers are used in order to give color value to canvas.
In this example, three independent sliders are used to control background color and they are in order of red, green and blue. All the values are written at the buttom of the application window in the precision of 0.001. You can change the precision in .kv file if you want. The color is sent by Kivy’s automatic property binding mechanism to Canvas Color and Label.
Working with kivy often requires writing canvas codes which are managing the appearance before, during and after the content is drawn. In this example, one Kivy Slider is used for getting color value between 0 and 1 and in the same time there is a Kivy Label which contains Slider’s value and updated automatically with the help of automatic property binding on Kivy. Continue reading Python Kivy Slider, Color and Canvas Example