As an alternative approach, there's a succinct way to achieve something similar using extract() with the caveat that your variables will be zero-indexed and contain an underscore; e.g: $color_0, $color_1 etc.
$arr = [10, 24, 33, 47, 58, 65];
extract($arr, EXTR_PREFIX_ALL, 'color');
var_dump($color_0, $color_1, $color_2, $color_3, $color_4, $color_5);
Yields:
int 10
int 24
int 33
int 47
int 58
int 65
You can enforce variable naming from one by modifying $arr slightly to enforce an index from one, like so:
$arr = [1 => 10, 24, 33, 47, 58, 65];
This creates variables named $color_1, $color_2 etc.
Hope this helps :)
Edit
I just noticed above, @James' point above is worth noting - a downside of this approach is that you can extract n number of 'invisible' variables into your program's scope. which isn't always a good thing, especially when you have to debug with var_dump(get_defined_vars()). extract can be quite useful though, for instance if you have a simple templating rendering system.