from IPython.display import display,HTML
def whtml(string,background_color='black',padding=2,
font_family='Aladin',font_size_px=int(24),
deg=int(120),percent=[0,33,67,100],
colors=['magenta','orange','cyan','purple']):
randi=random.randint(1,999999999)
html_str="""<style>@import """+\
"""'https://fonts.googleapis.com/css?family="""+\
font_family+"""';</style>"""+\
"""<div id='colorized_div' """+str(randi)+\
""" style='background:"""+background_color+\
"""; padding:"""+str(padding)+"""vw;'>"""+\
"""<div style='background:linear-gradient("""+\
colors[0]+""" """+str(percent[0])+"""%,"""+\
colors[1]+""" """+str(percent[1])+"""%,"""+\
colors[2]+""" """+str(percent[2])+"""%,"""+\
colors[3]+""" """+str(percent[3])+"""%"""+\
"""); font-family:"""+font_family+"""; """+\
"""font-size:"""+str(font_size_px)+"""px; """+\
"""-webkit-background-clip:text; color:transparent;'> """+\
string+"""</div></div>"""
corpus=['Have you already set your goals for the New Year?',
'Do you want to lose ten kilos, '+\
'run a marathon or speak fluent English?',
'Some experts believe that you need systems, not goals.',
'A system is something you do on a regular basis. ',
'This means focusing on what you can control '+\
'(your actions) rather than what you can’t.',
'For example, do not focus on losing ten kilos.',
'Focus on shopping for healthy food and '+\
'cooking something light every day.',
'Do not focus on the marathon.',
'Focus on the training schedule.',
'Invent a system to improve your English, '+\
corpus_str=' '.join(corpus)
No comments:
Post a Comment