Skip to main content

KivyGradient

KivyGradient allows you to add a gradient color to your Kivy Widget

Example Code

from kivy.app import App
from kivy.lang import Builder


kv = """
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import Gradient kivy_gradient.Gradient
RelativeLayout:
    BoxLayout
        id: box
        on_kv_post: print(get_color_from_hex("E91E63"))
        canvas:
            Rectangle:
                size: self.size
                pos: self.pos
                texture: Gradient.horizontal(get_color_from_hex("E91E63"), get_color_from_hex("FCE4EC"))
"""


class Test(App):
    def build(self):
        return Builder.load_string(kv)

    def on_stop(self):
        self.root.ids.box.export_to_png("gradient.png")


Test().run()

gradient

from kivy.app import App
from kivy.lang import Builder


kv = """
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import Gradient kivy_gradient.Gradient
RelativeLayout:
    BoxLayout
        id: box
        canvas:
            Rectangle:
                size: self.size
                pos: self.pos
                texture: 
                    Gradient.horizontal(
                    get_color_from_hex("E91E63"), 
                    get_color_from_hex("FCE4EC"), 
                    get_color_from_hex("2962FF")
                    )
"""


class Test(App):
    def build(self):
        return Builder.load_string(kv)

    def on_stop(self):
        self.root.ids.box.export_to_png("gradient.png")


Test().run()

gradient

Metadata

Release files for kivygradient 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kivygradient 0.0.4
File Size Uploaded Provenance Actions
KivyGradient-0.0.4.tar.gz 2.0 kB Without provenance Details for KivyGradient-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kivygradient 0.0.4
File Interpreter ABI Platform Actions
KivyGradient-0.0.4-py3-none-any.whl Python 3 none any Details for KivyGradient-0.0.4-py3-none-any.whl

Total release size: 4.1 kB

Release files / KivyGradient-0.0.4.tar.gz

Download URL KivyGradient-0.0.4.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1c9647dca7dfc0895310f3e7a90d99c2ddcc07c0b9c20d90586097d7750511cd
BLAKE2b-256 checksum
How to use checksums
c1236ade8c06b2ca2fb94a466f81e0d897de9a1ae586376601bdea35ffbfa418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5

Release files / KivyGradient-0.0.4-py3-none-any.whl

Download URL KivyGradient-0.0.4-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60d3a8927f1428961c8bbfcba688bf06445d7d7b6f500c2408a29062f6921f26
BLAKE2b-256 checksum
How to use checksums
440a94c95786f1f6b9909d6c2489f4581893f791edbee635596265b213504a7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5

Security for kivygradient 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page