Skip to content

Introduction

This document is mainly used to describe some features and usage of the getContrastTextColor utils.

Usage

typescript
import { getContrastTextColor } from '@/utils/common.ts'

getContrastTextColor('#fff') // => '#000'
getContrastTextColor('#000') // => '#fff'

Props