rgb
rgb(color: string): {
include: boolean,
matchs: RegExpMatchArray | null,
groups: Array<{
R: string | undefined,
G: string | undefined,
B: string | undefined,
A: string | undefined
} | null> | null
}Search rgb color in a string:
const { global } = require('regex-simplify');
const color = global.rgb(`
rgb(12, 255, 56)
rgba(12, 255, 56, 0.5)
`)
console.log(color);And here what return the function:
Last updated