didix21 / mdutils

Python package contains a set of basic tools that can help to create a markdown file.
https://pypi.org/project/mdutils
MIT License
206 stars 49 forks source link

Color support in title #60

Closed msidana closed 3 years ago

msidana commented 3 years ago

Is your feature request related to a problem? Please describe. Feature Request/Query.

Describe the solution you'd like I am writing an automation to generate report using mdutils. To make the report suit the theme, I was looking for an option to have an option to set colour for the titile

MdUtils(file_name='Report', title='XYZ Report', color='purple') 

Also want to know if there is an option to give hexcode RGB values as color in

mdFile.write('Text color', color=rgbhexcode)
didix21 commented 3 years ago

The problem is Markdown doesn't provide any built-in option to set colors to titles. This implies to use a workaround with HTML. Something like: <span style="color:red"> *some emphasized markdown text*</span>. So the abuse of HTML in a markdown will make MD files unreadable. For this reason, I think is not a good idea to introduce colors in Markdown titles.

Maybe, you should consider in using something like Latex.

About RGB colors for text is not supported but I like the idea.

msidana commented 3 years ago

Thanks for your reply. Btw, I really liked mdutils, made my life easy 👍🏻