WordCloud Font HSL Color
Code 1>from wordcloud import WordCloud from matplotlib import pyplot def make_colors(word, font_size, position, orientation, random_state, **kwargs): color = "hsl Color Code" return color text = '' with open("파일경로", encoding="utf-8") as f: text = f.read() wc = WordCloud(width=1200, height=800, scale=2.0, max_font_size=150, background_color="#ffffff") gen = wc.generate(text) recolor = gen.recolor..
WordCloud Font RGB Color
Code 1>from wordcloud import WordCloud from matplotlib import pyplot def make_colors(word, font_size, position, orientation, random_state, **kwargs): color = "rgb(0, 0, 0)" return color text = '' with open("파일경로명", encoding="utf-8") as f: text = f.read() wc = WordCloud(width=1200, height=800, scale=2.0, max_font_size=150, background_color="#ffffff") gen = wc.generate(text) recolor = gen.recolor(..
WordCloud Font Single Hex Color
Code>from wordcloud import WordCloud from matplotlib import pyplot def make_colors(word, font_size, position, orientation, random_state, **kwargs): color = "Hex Color Code" return color text = '' with open("파일경로", encoding="utf-8") as f: text = f.read() wc = WordCloud(width=1200, height=800, scale=2.0, max_font_size=150, background_color="#ffffff") gen = wc.generate(text) recolor = gen.recolor(c..