Skip to content

Instantly share code, notes, and snippets.

@umoqnier
Created March 24, 2020 22:48
Show Gist options
  • Save umoqnier/54c2ba7617e5a2ba8aa5055269ac10e1 to your computer and use it in GitHub Desktop.
Save umoqnier/54c2ba7617e5a2ba8aa5055269ac10e1 to your computer and use it in GitHub Desktop.
def set_colors(config):
hex_color = input('Color primario (HEXADECIMAL)>>')
config['PRIMARY_COLOR'] = '=#' + hex_color
config['SECONDARY_COLOR'] = '=#' + input('Color secundario (HEXADECIMAL)>>')
r = compute_color(int(hex_color[:2], base=16))
g = compute_color(int(hex_color[2:4], base=16))
b = compute_color(int(hex_color[4:], base=16))
breakpoint()
config['TEXT_COLOR'] = get_text_color(r, g, b)
return config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment