Already fixed it. When saving it to the database the hashtag is filtered out.
So with echoing the color, I just put a hashtag before it, like this:
function cloudboxx_customize_register( $wp_customize ) {
//All our sections, settings, and controls will be added here
$wp_customize->add_setting( 'header_textcolor' , array(
'default' => "#000000",
'transport' => 'refresh',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_textcolor', array(
'label' => __( 'Header Color', 'cloudboxx' ),
'section' => 'colors',
) ) );
}
add_action( 'customize_register', 'cloudboxx_customize_register' );
function cloudboxx_customize_css()
{
?>
<style type="text/css">
h2 { color: #<?php echo get_theme_mod('header_textcolor', "#000000"); ?>; }
</style>
<?php
}
add_action( 'wp_head', 'cloudboxx_customize_css');