Learn to Code via Tutorials on Repl.it!

← Back to all posts
⬜⬛ Color Fading Animation 🎬🎥
[deleted]

⬜⬛ Color Fading Animation 🎬🎥

Hope everyone is doing well >:)

In this tutorial, I will teach you how to do a color fading animation. It's very simple.

Import

You need to import these modules:

That's all the modules!

Colors

We don't need to import colors because we could just defined some colors:

These colors because they go well with each other in the fading animation.

Actual Code

First we need to print the brightest, darker, more darker, darkest. In this case:

This is a mistake

because there is waiting in between so each frame looks terrible. And we didn't clear the screen every time so it just printed it all out at once.

FIRST, we need to define the clear screen. (it's up to you if you want to do it, if you don't want to define it, just do:)

If you want to defined it, just do:

Then, you need to sleep in between each frame. I recommend sleeping 0.05 seconds. But...it's up to you.

FINALLY: finaly code:

If you liked this tutorial, slam🔨 that upvote button and make sure to check out my other tutorials too:

Python- The Basics Tutorial: https://repl.it/talk/learn/Python-The-Basics/117133

Getkey Function tutorial: https://repl.it/talk/learn/GetKey-Function-Tutorial/116955

Data Base Tutorial: https://repl.it/talk/learn/Python-Data-Base-Tutorial/117319

>That's it! 👋

The project is down below 👇. A PEACE! 👋 👋 👋 👋

Voters
NathanFlynn3
TsunamiOrSmth
SilvermoonCat
LuckyOreos
Comments
hotnewtop
SilvermoonCat

cooooool
suggest you add a while loop so it goes on forever :D

LuckyOreos

Coooool