1.2.1 • Published 10 months ago

markdown-it-mojicolor v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

markdown-it-mojicolor

GitHub npm

The markdown-it plugin that allows you to change the text color of Markdown.

TOC

Setup

Install via npm:

npm install markdown-it-mojicolor

Use with markdown-it:

const 
    md = require('markdown-it')(),
    plugin = require("markdown-it-mojicolor");

md.use(plugin);

Quick usage

InputRenderDescription
%Tomato%{tomato}<span style="color: tomato;">Tomato</span>Specified by color.
%Orange%{#ffa500}<span style="color: #ffa500;">Orange</span>Specified in hexadecimal.
%café au lait%{カフェオレ}<span style="color: #946c45;">café au lait</span>Specified in Japanese, converted to hexadecimal.
%Aqua%{rgb(0,255,255)}<span style="color: rgb(0,255,255);">Aqua</span>Specified in RGB.
%Bisque%{hsl(33,100%,88%)}<span style="color: hsl(33,100%,88%);">Bisque</span>Specified in HSL.

Usage

A markdown-it plugin that converts %character%{color} to <span style="color: color">character</span>.

Colors should be specified as color word, hexadecimal, RGB or HSL.

It also supports Japanese. For example, if you specify カフェオレ meaning café au lait, it will be converted to #946c45, which closely resembles the color of café au lait.

To find out which colors are supported, refer to Traditional Colors of Japan - Dictionary of Japanese Colors.

Reference Website

The original site (https://www.colordic.org/) has granted us permission to publish and use the site on OSS.

Extensions

1.2.1

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.0

11 months ago