Hi! I am writing post about testing framework which emits nice colorful output, how can I colorize text through dev.to markdown?
Thank you.
Hi! I am writing post about testing framework which emits nice colorful output, how can I colorize text through dev.to markdown?
Thank you.
For further actions, you may consider blocking this person and/or reporting abuse
Mike Young -
Mike Young -
Mike Young -
Mike Young -
Top comments (6)
Hey there! You can colorize text in code blocks, but not the regular text.
To use a code block, type wrap some code with triple back ticks:
![code block with no colors example](https://res.cloudinary.com/practicaldev/image/fetch/s--jJ6_pSMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/n8t1mjgn6e13m0h5zcxc.png)
To colorize it, add a language immediately after the first set of triple back ticks:
![code block with colors example](https://res.cloudinary.com/practicaldev/image/fetch/s--lcN0RLx1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/m6m3x52z41tcu1kxrd36.png)
You can find more info in our editor guide: dev.to/p/editor_guide
Thanks Andy. Maybe worth it to allow color text snipped, irrelevant to text? But it is probably beyond Markdown scope ...
I think it may be. Perhaps you could use a Codepen embed as described in the guide?
I presume it only works with Language source code? Not with just any text?
carbon.now.sh is a good option if you don't mind sharing your code as an image. A reader wouldn't get the copy/paste option, but you can create a colorful image.
Hi Derek! Will take a look, thanks a lot!