Custom color hover on wordpress thumbnails
===

I have no idea what I'm doing.
It took me 9 tutorials and 3 hours to finally get my custom metabox working, ouf!

Now, I want to extract this data, so that it can be used as a hexa color for a jquery overlay, similar to [this post][1].

Here is my code for the custom box

	// Create the custom box
	
	add_action( 'admin_init', 'add_custom_metabox' );
	add_action( 'save_post', 'save_custom_color' );
	
	
	// Add meta box
	
	function add_custom_metabox() {
		add_meta_box( 'custom-metabox', __( 'Couleur' ), 'color_custom_metabox', 'portfolio', 'side', 'high' );
	}
	
	
	// Display the metabox
	
	function color_custom_metabox() {
		global $post;
		$color = get_post_meta( $post->ID, 'color', true );
		?>
	
		<p><label for="couleur">Hexadecimal:<br />
			<input id="couleur" size="25" name="couleur" value="<?php if( $color ) { echo $color; } ?>" /></label></p>
	<?php
	}
	
	
	// Process the custom metabox fields
	
	function save_custom_color( $post_id ) {
		global $post;	
	
		if( $_POST ) {
			update_post_meta( $post->ID, 'color', $_POST['couleur'] );
		}
	}
	
	
	// Get and return the values for the Color
	
	function get_color() {
		global $post;
		$color = get_post_meta( $post->ID, 'color', true );
	
		return array( $color );
	} // create the custom post END



and here is the code for getting the data, but it doesn't seems to be working at all

	<?php
	$colorbox = get_color();
	echo $colorbox[0]; // echo out the url of a post
	echo $colorbox[1]; // echo out the url description of a post
	?>
	

and another one, not working either…

	 <?php $meta_values = get_post_meta($color); ?> 


What is wrong with me (or my code)?

  [1]: http://stackoverflow.com/q/7010515/1512459