WordPress at Your Fingertips
function is not described

block_core_social_link_get_color_styles() WP 1.0

Returns CSS styles for icon and icon background colors.

No Hooks.

Return

String. Inline CSS styles for link's icon and background colors.

Usage

block_core_social_link_get_color_styles( $context );
$context(array) (required)
Block context passed to Social Link.

Code of block_core_social_link_get_color_styles() WP 5.7.2

<?php
function block_core_social_link_get_color_styles( $context ) {
	$styles = array();

	if ( array_key_exists( 'iconColorValue', $context ) ) {
		$styles[] = 'color: ' . $context['iconColorValue'] . '; ';
	}

	if ( array_key_exists( 'iconBackgroundColorValue', $context ) ) {
		$styles[] = 'background-color: ' . $context['iconBackgroundColorValue'] . '; ';
	}

	return implode( '', $styles );
}