<?php
$current_post = $post_id;
if( have_rows('acf-colours', 'option') ):
while( have_rows('acf-colours', 'option') ) : the_row();
$post_objects = get_sub_field('pages');
if( ($post_objects) ):
foreach ($post_objects as $post_object) {
if ($post_object->ID == $current_post) {
?>
sub-menu-<?php the_sub_field( 'colour' ); ?>
<?php
} // end if current post
} // end foreach post
endif;
endwhile;
endif;
?>