WordPress at a glance
function is not described

wc_light_or_dark() WC 1.0

Detect if we should use a light or dark color on a background color.

No Hooks.

Return

String. Nothing.

Usage

wc_light_or_dark( $color, $dark, $light );
$color(mixed) (required)
Color.
$dark(string)
Darkest reference.
Default: '#000000'
$light(string)
Lightest reference.
Default: '#FFFFFF'

Code of wc_light_or_dark() WC 5.3.0

<?php
function wc_light_or_dark( $color, $dark = '#000000', $light = '#FFFFFF' ) {
	return wc_hex_is_light( $color ) ? $dark : $light;
}