io.sureshg.extn / kotlin.String / grayScale

grayScale

fun String.grayScale(code: Int, fg: Boolean = true): String

Returns 8-bit gray scale (From 232 to 256 in color set) formatted string.

Parameters

code - color code in the range 0 to (256-232) fg - true for foreground color, otherwise background. Default is true