Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Random to get Colors #1

Closed
4 tasks done
KennyOliver opened this issue Dec 5, 2021 · 6 comments · Fixed by #3
Closed
4 tasks done

Use Random to get Colors #1

KennyOliver opened this issue Dec 5, 2021 · 6 comments · Fixed by #3
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@KennyOliver
Copy link
Owner

KennyOliver commented Dec 5, 2021

Use random to:

  • Choose a random color
  • Print a string in many random colors

Another feature to add:

  • Iterate over characters for rainbow effect

Additionally:

  • Add relevant info & code to the README.md documentation
@KennyOliver KennyOliver added enhancement New feature or request good first issue Good for newcomers labels Dec 5, 2021
@KennyOliver KennyOliver pinned this issue Dec 5, 2021
@esouidi
Copy link
Contributor

esouidi commented Dec 5, 2021

Hi, I want to work on this, can you assign me ?

@KennyOliver
Copy link
Owner Author

KennyOliver commented Dec 5, 2021

Awesome! Glad to have you on board! 😄
You can do all of those 4 tasks if you'd like. I've reordered them in terms of least to most difficult.

Tips/More Info

You just need to modify __init__.py:

  • Add these 3 new functions as methods of the Clr class:
    • Give the methods appropriate names (i.e., Clr.random(), Clr.jazzy(string), Clr.rainbow(string))

Don't forget to update the README.md documentation too, please

@esouidi
Copy link
Contributor

esouidi commented Dec 5, 2021

All right, I've already started to work on it.
However, I don't really get the difference between the instruction 2 and 3. When you say rainbow effect, do you mean colors have to change on the system output ?
For the moment this is what I have : image

@KennyOliver
Copy link
Owner Author

KennyOliver commented Dec 5, 2021

Looks cool so far but please make the functions have more succinct names for ease of use.

For rainbow:
Each character has to change in color, e.g. "hello world" would be colored red, orange, yellow, green, etc. for each character
My bad... rainbow isn't random, but my issue made it seem like it was.

Like below:
images
(couldn't find a good pic)

For random colors:
Each character is assigned a random color - even if two adjacent characters are given the same color code.

@KennyOliver
Copy link
Owner Author

KennyOliver commented Dec 7, 2021

Closed with #3 thanks for contributing

@KennyOliver
Copy link
Owner Author

@esouidi your code is now on Test PyPi as part of the package 👍
Hopefully it'll eventually be updated officially to PyPi

@KennyOliver KennyOliver linked a pull request Dec 9, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants