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

Add common LGBT flag color schemes for scroll animation #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 58 additions & 8 deletions animations/scroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,65 @@
'!':bytearray([0x17,0x17,0x00]),
'?':bytearray([0x01,0x15,0x02,0x00])}


class Color:
RED = 0b11100000
ORANGE = 0b11101000
YELLOW = 0b11111100
GREEN = 0b00011100
BLUE = 0b00000011
LIGHTBLUE = 0b00100111
PURPLE = 0b01100011
PINK = 0b11100101
WHITE = 0b11111111
GREY = 0b01001001
BLACK = 0b00100101


class scroll:
color_map = [
0xe0, # Red
0xe8, # Orange
0xfc, # Yellow
0x1c, # Green
0x03, # Blue
0x43 # Purple
]
# asexual, bisexual, nonbinary
# pansexual, transgender, gaypride (default)
if settings.bannerscheme == 'asexual': # *shrug* "Guess I can't do ace." "Yeah, none of us can."
color_map = [
Color.BLACK, # "What are you gonna do? Turn it off? :eyes:"
Color.GREY,
Color.WHITE,
Color.PURPLE
]
elif settings.bannerscheme == 'bisexual':
color_map = [
Color.PINK,
Color.PURPLE,
Color.BLUE
]
elif settings.bannerscheme == 'nonbinary':
color_map = [
Color.YELLOW,
Color.WHITE,
Color.PURPLE,
Color.BLACK
]
elif settings.bannerscheme == 'pansexual':
color_map = [
Color.PINK,
Color.YELLOW,
Color.LIGHTBLUE
]
elif settings.bannerscheme == 'transgender':
color_map = [
Color.LIGHTBLUE,
Color.PINK,
Color.WHITE
]
else: # gaypride, default
color_map = [
Color.RED,
Color.ORANGE,
Color.YELLOW,
Color.GREEN,
Color.BLUE,
Color.PURPLE
]

def __init__(self, text=None):
if text:
Expand Down
5 changes: 5 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
# The default banner message to print in the scroll.py animation.
banner = "DEFCON Furs"

# Default color scheme to print in the scroll.py animation.
# asexual, bisexual, nonbinary
# pansexual, transgender, gaypride (default)
bannerscheme = 'gaypride'

# Enable extra verbose debug messages.
debug = False

Expand Down