Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Color Me

Color Me

// Add Shortcode
function text_colour( $atts , $content = null ) {

	// Attributes
	extract( shortcode_atts(
		array(
			'color' => '',
		), $atts )
	);

	// Code
return '<div class="color-me">' . do_shortcode($content) . '</div>
<style type="text/css">
color:' .  $color . '; 
</style>';
}
add_shortcode( 'text_colour', 'text_colour' );