import { isHexColorFormat } from "https://deno.land/x/isx@1.0.0-beta.22/mod.ts";
Whether the value is Hex color or not.
Parameters
- Any
string
.
import { isHexColorFormat } from "https://deno.land/x/isx@$VERSION/mod.ts"
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts"
assertEquals(isHexColorFormat("#000000"), true)
assertEquals(isHexColorFormat("#FFF"), true)
assertEquals(isHexColorFormat("#ggg"), false)