@icenore/tm-colors-text
v1.1.0
Published
A program that take a Trackmania text with $ code and return a style for every chars
Downloads
3
Readme
Description
It's a package for Javascript WebSites.
If you want the package for angular in typescript, you can use ng-tm-colors-text
.
This package return an array with each char of a text with style to be used in ngFor.
Installation
$ npm install --save @icenore/tm-colors-text
Usage
Import
const tmColorsText = require('@icenore/tm-colors-text')
const style = tmColorsText.TmColorsText('$o$FF0Hello $0FFWorld', 18)
Return
This return an array of Object like this:
[{
"char": "a",
"style": "color: #FFF; font-size: 18px; font-weight: normal; text-shadow: none;",
"index": "0"
}]