Skip to content

pantoken / renderers/react-markdown/src / isColorValue

Fonksiyon: isColorValue()

isColorValue(value): boolean

Beta

Bir dize bağımsız bir CSS renk değeri (hex veya bir renk fonksiyonu) olduğunda Doğru.

Parametreler

value

string

Döndürür

boolean

Örnek

ts
import { isColorValue } from "@pantoken/react-markdown";

isColorValue("#03893D"); // true
isColorValue("oklch(0.7 0.1 200)"); // true
isColorValue("hello"); // false